From f954fccffffb7f2424dfc1581b51c662c6d9d378 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 4 Apr 2017 12:40:43 +0100 Subject: [PATCH] Duplicate cd --- src/freedombone-utils-gnusocialtools | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index c0159af4..0170336b 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -245,17 +245,16 @@ function gnusocial_hourly_script { echo -n 'daemon_lines=$(ps aux | grep "' >> /etc/cron.hourly/${gnusocial_type}-daemons echo -n "${domain_name}" >> /etc/cron.hourly/${gnusocial_type}-daemons echo '/htdocs/scripts/queuedaemon.php" | grep "/var/www")' >> /etc/cron.hourly/${gnusocial_type}-daemons + echo "cd /var/www/${domain_name}/htdocs" >> /etc/cron.hourly/${gnusocial_type}-daemons echo 'if [[ $daemon_lines != *"/var/www/"* ]]; then' >> /etc/cron.hourly/${gnusocial_type}-daemons echo " ADMIN_USER=\$(cat $COMPLETION_FILE | grep 'Admin user' | awk -F ':' '{print \$2}')" >> /etc/cron.hourly/${gnusocial_type}-daemons echo ' MY_EMAIL_ADDRESS=$ADMIN_USER@$HOSTNAME' >> /etc/cron.hourly/${gnusocial_type}-daemons echo -n " echo \"Restarting ${gnusocial_type} daemons\" | mail -s \"${gnusocial_type} " >> /etc/cron.hourly/${gnusocial_type}-daemons echo 'daemons not found" $MY_EMAIL_ADDRESS' >> /etc/cron.hourly/${gnusocial_type}-daemons - echo " cd /var/www/${domain_name}/htdocs" >> /etc/cron.hourly/${gnusocial_type}-daemons echo ' scripts/startdaemons.sh' >> /etc/cron.hourly/${gnusocial_type}-daemons echo 'fi' >> /etc/cron.hourly/${gnusocial_type}-daemons - echo "cd /var/www/${domain_name}/htdocs" >> /etc/cron.hourly/${gnusocial_type}-daemons echo 'php scripts/delete_orphan_files.php > /dev/null' >> /etc/cron.hourly/${gnusocial_type}-daemons echo 'php scripts/clean_thumbnails.php -y > /dev/null' >> /etc/cron.hourly/${gnusocial_type}-daemons echo 'php scripts/clean_file_table.php -y > /dev/null' >> /etc/cron.hourly/${gnusocial_type}-daemons