From e7ddb66c50b6c654fc57086d6b91d9b57773ac24 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 21 Feb 2018 21:40:30 +0000 Subject: [PATCH] Use cron functions --- src/freedombone-app-bdsmail | 2 +- src/freedombone-app-icecast | 2 +- src/freedombone-app-pleroma | 2 +- src/freedombone-utils-gnusocialtools | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/freedombone-app-bdsmail b/src/freedombone-app-bdsmail index 5b4e86f2..20ae44f1 100755 --- a/src/freedombone-app-bdsmail +++ b/src/freedombone-app-bdsmail @@ -404,7 +404,7 @@ function install_bdsmail { chmod +x /usr/bin/bdsmail_distribute if ! grep -q 'bdsmail_distribute' /etc/crontab; then - echo '*/1 * * * * root /usr/bin/bdsmail_distribute 2> /dev/null' >> /etc/crontab + cron_add_mins 1 '/usr/bin/bdsmail_distribute 2> /dev/null' fi echo '#!/bin/bash' > /usr/bin/bdsmail_domain diff --git a/src/freedombone-app-icecast b/src/freedombone-app-icecast index 8f0ab535..05f6e43f 100755 --- a/src/freedombone-app-icecast +++ b/src/freedombone-app-icecast @@ -105,7 +105,7 @@ function icecast_update_daemon { systemctl enable icecast2 if ! grep -q "start_icecast" /etc/crontab; then - echo '*/1 * * * * root /usr/bin/start_icecast > /dev/null' >> /etc/crontab + cron_add_mins 1 '/usr/bin/start_icecast 2> /dev/null' fi } diff --git a/src/freedombone-app-pleroma b/src/freedombone-app-pleroma index a097351d..a31cd238 100755 --- a/src/freedombone-app-pleroma +++ b/src/freedombone-app-pleroma @@ -127,7 +127,7 @@ function create_pleroma_blocklist { chmod +x $blocking_script_file if ! grep -q "$blocking_script_file" /etc/crontab; then - echo "*/1 * * * * root $blocking_script_file > /dev/null" >> /etc/crontab + cron_add_mins 1 "$blocking_script_file 2> /dev/null" fi } diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index b94167f8..466222ff 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -654,7 +654,7 @@ function gnusocial_block_domain_script { chmod +x /usr/bin/${database_name}-firewall if ! grep -q "${database_name}-firewall" /etc/crontab; then - echo "*/1 * * * * root /usr/bin/${database_name}-firewall" >> /etc/crontab + cron_add_mins 1 "/usr/bin/${database_name}-firewall" fi }