Bob Mottram 8 years ago
parent
commit
31300402d4

+ 1
- 1
src/freedombone-app-gnusocial View File

@@ -208,7 +208,7 @@ function gnusocial_create_database {
208 208
 }
209 209
 
210 210
 function gnusocial_running_script {
211
-    if ! grep -Fxq "install_gnusocial" $COMPLETION_FILE; then
211
+    if [[ $(is_completed $FUNCNAME) == "1" ]]; then
212 212
         return
213 213
     fi
214 214
 

+ 1
- 1
src/freedombone-app-irc View File

@@ -256,7 +256,7 @@ function configure_firewall_for_irc {
256 256
     if [ ! -d /etc/ngircd ]; then
257 257
         return
258 258
     fi
259
-    if grep -Fxq "configure_firewall_for_irc" ${COMPLETION_FILE}; then
259
+    if [[ $(is_completed $FUNCNAME) == "1" ]]; then
260 260
         return
261 261
     fi
262 262
     if [[ ${INSTALLED_WITHIN_DOCKER} == "yes" ]]; then

+ 4
- 4
src/freedombone-app-rss View File

@@ -114,7 +114,7 @@ function upgrade_rss {
114 114
 
115 115
         # remove any previous install
116 116
         if [ -d $RSS_READER_PATH/g2ttree-mobile ]; then
117
-            if grep -Fxq "install_rss_mobile_reader" $COMPLETION_FILE; then
117
+            if [[ $(is_completed "install_rss_mobile_reader") == "1" ]]; then
118 118
                 sed -i '/install_rss_mobile_reader/d' $COMPLETION_FILE
119 119
                 sed -i '/rss mobile reader commit/d' $COMPLETION_FILE
120 120
                 rm -rf $RSS_READER_PATH/g2ttree-mobile
@@ -523,7 +523,7 @@ function install_rss_gnusocial {
523 523
     set_repo_commit $RSS_READER_GNUSOCIAL_PATH "rss reader gnusocial commit" "$RSS_READER_GNUSOCIAL_COMMIT" $RSS_READER_GNUSOCIAL_REPO
524 524
     chown -R www-data:www-data $RSS_READER_GNUSOCIAL_PATH
525 525
 
526
-    if grep -Fxq "install_rss_gnusocial" $COMPLETION_FILE; then
526
+    if [[ $(is_completed $FUNCNAME) == "1" ]]; then
527 527
         return
528 528
     fi
529 529
 
@@ -560,14 +560,14 @@ function install_rss_mobile_reader {
560 560
 
561 561
     # remove any previous install
562 562
     if [ -d $RSS_READER_PATH/g2ttree-mobile ]; then
563
-        if grep -Fxq "install_rss_mobile_reader" $COMPLETION_FILE; then
563
+        if [[ $(is_completed "install_rss_mobile_reader") == "1" ]]; then
564 564
             sed -i '/install_rss_mobile_reader/d' $COMPLETION_FILE
565 565
             sed -i '/rss mobile reader commit/d' $COMPLETION_FILE
566 566
             rm -rf $RSS_READER_PATH/g2ttree-mobile
567 567
         fi
568 568
     fi
569 569
 
570
-    if grep -Fxq "install_rss_mobile_reader" $COMPLETION_FILE; then
570
+    if [[ $(is_completed $FUNCNAME) == "1" ]]; then
571 571
         return
572 572
     fi
573 573
 

+ 3
- 3
src/freedombone-base-email View File

@@ -248,7 +248,7 @@ function email_client {
248 248
     if [ ! -d /etc/exim4 ]; then
249 249
         return
250 250
     fi
251
-    if grep -Fxq "email_client" $COMPLETION_FILE; then
251
+    if [[ $(is_completed $FUNCNAME) == "1" ]]; then
252 252
         return
253 253
     fi
254 254
     apt-get -y install mutt-patched lynx abook
@@ -607,7 +607,7 @@ function import_email {
607 607
       Now on your internet router forward ports
608 608
      25, 587, 465, 993 and 2222 to the ${PROJECT_NAME}
609 609
 "
610
-    if grep -Fxq "import_email" $COMPLETION_FILE; then
610
+    if [[ $(is_completed $FUNCNAME) == "1" ]]; then
611 611
         if [[ $SYSTEM_TYPE == "mail"* ]]; then
612 612
             function_check backup_to_friends_servers
613 613
             backup_to_friends_servers
@@ -673,7 +673,7 @@ function install_email {
673 673
     if [[ $SYSTEM_TYPE == "mesh"* ]]; then
674 674
         return
675 675
     fi
676
-    if grep -Fxq "install_email" $COMPLETION_FILE; then
676
+    if [[ $(is_completed $FUNCNAME) == "1" ]]; then
677 677
         return
678 678
     fi
679 679
     apt-get -y remove postfix

+ 1
- 1
src/freedombone-utils-firewall View File

@@ -102,7 +102,7 @@ function configure_firewall {
102 102
 }
103 103
 
104 104
 function configure_firewall_ping {
105
-    if grep -Fxq "configure_firewall_ping" $COMPLETION_FILE; then
105
+    if [[ $(is_completed $FUNCNAME) == "1" ]]; then
106 106
         return
107 107
     fi
108 108
     # Only allow ping for mesh installs

+ 1
- 1
src/freedombone-utils-setup View File

@@ -110,7 +110,7 @@ function initial_setup {
110 110
 function search_for_attached_usb_drive {
111 111
     # If a USB drive is attached then search for email,
112 112
     # gpg, ssh keys and emacs configuration
113
-    if grep -Fxq "search_for_attached_usb_drive" $COMPLETION_FILE; then
113
+    if [[ $(is_completed $FUNCNAME) == "1" ]]; then
114 114
         return
115 115
     fi
116 116
     if [ -b $USB_DRIVE ]; then