Bob Mottram 8 years ago
parent
commit
31300402d4

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

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

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

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

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

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

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

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

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

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

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

110
 function search_for_attached_usb_drive {
110
 function search_for_attached_usb_drive {
111
     # If a USB drive is attached then search for email,
111
     # If a USB drive is attached then search for email,
112
     # gpg, ssh keys and emacs configuration
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
         return
114
         return
115
     fi
115
     fi
116
     if [ -b $USB_DRIVE ]; then
116
     if [ -b $USB_DRIVE ]; then