Browse Source

Use cron functions

Bob Mottram 7 years ago
parent
commit
e7ddb66c50

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

@@ -404,7 +404,7 @@ function install_bdsmail {
404 404
     chmod +x /usr/bin/bdsmail_distribute
405 405
 
406 406
     if ! grep -q 'bdsmail_distribute' /etc/crontab; then
407
-        echo '*/1            * *   *   *   root /usr/bin/bdsmail_distribute 2> /dev/null' >> /etc/crontab
407
+        cron_add_mins 1 '/usr/bin/bdsmail_distribute 2> /dev/null'
408 408
     fi
409 409
 
410 410
     echo '#!/bin/bash' > /usr/bin/bdsmail_domain

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

@@ -105,7 +105,7 @@ function icecast_update_daemon {
105 105
     systemctl enable icecast2
106 106
 
107 107
     if ! grep -q "start_icecast" /etc/crontab; then
108
-        echo '*/1            * *   *   *   root /usr/bin/start_icecast > /dev/null' >> /etc/crontab
108
+        cron_add_mins 1 '/usr/bin/start_icecast 2> /dev/null'
109 109
     fi
110 110
 }
111 111
 

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

@@ -127,7 +127,7 @@ function create_pleroma_blocklist {
127 127
     chmod +x $blocking_script_file
128 128
 
129 129
     if ! grep -q "$blocking_script_file" /etc/crontab; then
130
-        echo "*/1            * *   *   *   root $blocking_script_file > /dev/null" >> /etc/crontab
130
+        cron_add_mins 1 "$blocking_script_file 2> /dev/null"
131 131
     fi
132 132
 }
133 133
 

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

@@ -654,7 +654,7 @@ function gnusocial_block_domain_script {
654 654
     chmod +x /usr/bin/${database_name}-firewall
655 655
 
656 656
     if ! grep -q "${database_name}-firewall" /etc/crontab; then
657
-        echo "*/1            * *   *   *   root /usr/bin/${database_name}-firewall" >> /etc/crontab
657
+        cron_add_mins 1 "/usr/bin/${database_name}-firewall"
658 658
     fi
659 659
 }
660 660