Browse Source

Reverse logic

Bob Mottram 7 years ago
parent
commit
bb64427344

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

@@ -570,7 +570,9 @@ function remove_gnusocial {
570 570
     sed -i '/gnusocial/d' $COMPLETION_FILE
571 571
     remove_backup_database_local gnusocial
572 572
 
573
-    sed -i '/gnusocial-firewall/d' /etc/crontab
573
+    if grep -q 'gnusocial-firewall' /etc/crontab; then
574
+        sed -i '/gnusocial-firewall/d' /etc/crontab
575
+    fi
574 576
 
575 577
     function_check remove_ddns_domain
576 578
     remove_ddns_domain $GNUSOCIAL_DOMAIN_NAME

+ 0
- 5
src/freedombone-app-koel View File

@@ -466,16 +466,11 @@ function remove_koel {
466 466
     drop_database koel
467 467
     function_check remove_onion_service
468 468
     remove_onion_service koel ${KOEL_ONION_PORT}
469
-    if grep -q "koel" /etc/crontab; then
470
-        sed -i "/koel/d" /etc/crontab
471
-    fi
472 469
     remove_app koel
473 470
     remove_completion_param install_koel
474 471
     sed -i '/koel/d' $COMPLETION_FILE
475 472
     remove_backup_database_local koel
476 473
 
477
-    sed -i '/koel-firewall/d' /etc/crontab
478
-
479 474
     function_check remove_ddns_domain
480 475
     remove_ddns_domain $KOEL_DOMAIN_NAME
481 476
 }

+ 0
- 3
src/freedombone-app-nextcloud View File

@@ -374,9 +374,6 @@ function remove_nextcloud {
374 374
     drop_database nextcloud
375 375
     function_check remove_onion_service
376 376
     remove_onion_service nextcloud ${NEXTCLOUD_ONION_PORT}
377
-    if grep -q "nextcloud" /etc/crontab; then
378
-        sed -i "/nextcloud/d" /etc/crontab
379
-    fi
380 377
     remove_app nextcloud
381 378
     remove_completion_param install_nextcloud
382 379
     sed -i '/nextcloud/d' $COMPLETION_FILE

+ 2
- 2
src/freedombone-logging View File

@@ -83,7 +83,7 @@ function turn_logging_off {
83 83
 }
84 84
 
85 85
 function turn_off_rsys_logging {
86
-    if grep -q '/var/log/auth.log' /etc/rsyslog.conf; then
86
+    if ! grep -q '/var/log/auth.log' /etc/rsyslog.conf; then
87 87
         return
88 88
     fi
89 89
     sed -i 's|mail,news.none.*|mail,news.none      /dev/null|g' /etc/rsyslog.conf
@@ -109,7 +109,7 @@ function turn_off_rsys_logging {
109 109
 }
110 110
 
111 111
 function turn_on_rsys_logging {
112
-    if ! grep -q '/var/log/auth.log' /etc/rsyslog.conf; then
112
+    if grep -q '/var/log/auth.log' /etc/rsyslog.conf; then
113 113
         return
114 114
     fi
115 115
     sed -i 's|mail,news.none.*|mail,news.none      -/var/log/messages|g' /etc/rsyslog.conf