From 3c8f0fc6c9627729b1e76932b1de9f6b6bd8b0cc Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 11 Dec 2015 15:13:58 +0000 Subject: [PATCH] Avoid multiple entries --- src/freedombone | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/freedombone b/src/freedombone index e8639530..5a30d992 100755 --- a/src/freedombone +++ b/src/freedombone @@ -7473,8 +7473,9 @@ quit" > $INSTALL_DIR/batch.sql echo ' cp -f /var/backups/gnusocial_weekly.sql /var/backups/gnusocial_monthly.sql' >> /etc/cron.monthly/backupdatabasesmonthly echo 'fi' >> /etc/cron.monthly/backupdatabasesmonthly - echo "${PROJECT_NAME}-repair-database gnusocial" >> /etc/cron.hourly/repair - + if ! grep -q "gnusocial" /etc/cron.hourly/repair; then + echo "${PROJECT_NAME}-repair-database gnusocial" >> /etc/cron.hourly/repair + fi nginx_ensite $MICROBLOG_DOMAIN_NAME service php5-fpm restart service nginx restart @@ -7795,7 +7796,9 @@ quit" > $INSTALL_DIR/batch.sql echo ' cp -f /var/backups/hubzilla_weekly.sql /var/backups/hubzilla_monthly.sql' >> /etc/cron.monthly/backupdatabasesmonthly echo 'fi' >> /etc/cron.monthly/backupdatabasesmonthly - echo "${PROJECT_NAME}-repair-database hubzilla" >> /etc/cron.hourly/repair + if ! grep -q "hubzilla" /etc/cron.hourly/repair; then + echo "${PROJECT_NAME}-repair-database hubzilla" >> /etc/cron.hourly/repair + fi chown -R www-data:www-data /var/www/$HUBZILLA_DOMAIN_NAME/htdocs