From 9ec20428daa336088c93cc585b7e81bafec5c2c1 Mon Sep 17 00:00:00 2001 From: Bob Mottram <bob@freedombone.net> Date: Sun, 2 Apr 2017 21:44:49 +0100 Subject: [PATCH] Fix hourly daemons --- src/freedombone-app-gnusocial | 4 ++-- src/freedombone-app-postactiv | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/freedombone-app-gnusocial b/src/freedombone-app-gnusocial index 8fdcc6edb..f0d1bb482 100755 --- a/src/freedombone-app-gnusocial +++ b/src/freedombone-app-gnusocial @@ -225,8 +225,8 @@ function gnusocial_create_database { function gnusocial_running_script { # check that the daemon is running echo '#!/bin/bash' > /etc/cron.hourly/gnusocial-daemons - echo -n 'daemon_lines=$(ps aux | grep "' - echo -n "${GNUSOCIAL_DOMAIN_NAME}" + echo -n 'daemon_lines=$(ps aux | grep "'>> /etc/cron.hourly/gnusocial-daemons + echo -n "${GNUSOCIAL_DOMAIN_NAME}">> /etc/cron.hourly/gnusocial-daemons echo '/htdocs/scripts/queuedaemon.php" | grep "/var/www")' >> /etc/cron.hourly/gnusocial-daemons echo 'if [[ $daemon_lines != *"/var/www/"* ]]; then' >> /etc/cron.hourly/gnusocial-daemons diff --git a/src/freedombone-app-postactiv b/src/freedombone-app-postactiv index 803c662df..4a74a27c6 100755 --- a/src/freedombone-app-postactiv +++ b/src/freedombone-app-postactiv @@ -199,7 +199,9 @@ function postactiv_create_database { function postactiv_running_script { # check that the daemon is running echo '#!/bin/bash' > /etc/cron.hourly/postactiv-daemons - echo 'daemon_lines=$(ps aux | grep "${POSTACTIV_DOMAIN_NAME}/htdocs/scripts/queuedaemon.php" | grep "/var/www")' >> /etc/cron.hourly/postactiv-daemons + echo -n 'daemon_lines=$(ps aux | grep "' >> /etc/cron.hourly/postactiv-daemons + echo -n "${POSTACTIV_DOMAIN_NAME}" >> /etc/cron.hourly/postactiv-daemons + echo '/htdocs/scripts/queuedaemon.php" | grep "/var/www")' >> /etc/cron.hourly/postactiv-daemons echo 'if [[ $daemon_lines != *"/var/www/"* ]]; then' >> /etc/cron.hourly/postactiv-daemons echo " ADMIN_USER=\$(cat $COMPLETION_FILE | grep 'Admin user' | awk -F ':' '{print \$2}')" >> /etc/cron.hourly/postactiv-daemons -- GitLab