diff --git a/src/freedombone-app-gnusocial b/src/freedombone-app-gnusocial index f4c7255e..3a4ebf48 100755 --- a/src/freedombone-app-gnusocial +++ b/src/freedombone-app-gnusocial @@ -404,7 +404,7 @@ function restore_local_gnusocial { gnusocial_dir=/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs # stop the daemons cd $gnusocial_dir - scripts/stopdaemons.sh + su -c "sh scripts/stopdaemons.sh" -s /bin/sh www-data function_check gnusocial_create_database gnusocial_create_database @@ -416,7 +416,7 @@ function restore_local_gnusocial { # start the daemons cd $gnusocial_dir - scripts/startdaemons.sh + su -c "sh scripts/startdaemons.sh" -s /bin/sh www-data echo $"Restore of gnusocial complete" fi } @@ -452,7 +452,7 @@ function restore_remote_gnusocial { # stop the daemons cd /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs - ./scripts/stopdaemons.sh + su -c "sh scripts/stopdaemons.sh" -s /bin/sh www-data function_check gnusocial_create_database gnusocial_create_database @@ -465,7 +465,7 @@ function restore_remote_gnusocial { # start the daemons cd /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs - ./scripts/startdaemons.sh + su -c "sh scripts/startdaemons.sh" -s /bin/sh www-data echo $"Restore of gnusocial complete" fi } @@ -487,7 +487,7 @@ function remove_gnusocial { fi if [ -f /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/scripts/stopdaemons.sh ]; then cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/scripts - ./scripts/stopdaemons.sh + su -c "sh scripts/stopdaemons.sh" -s /bin/sh www-data fi kill_pid=$(ps aux | grep /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/scripts/queuedaemon.php | awk -F ' ' '{print $2}' | head -n 1) kill -9 $kill_pid diff --git a/src/freedombone-app-postactiv b/src/freedombone-app-postactiv index f4fde09d..51ba08d0 100755 --- a/src/freedombone-app-postactiv +++ b/src/freedombone-app-postactiv @@ -411,7 +411,7 @@ function restore_local_postactiv { postactiv_dir=/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs # stop the daemons cd $postactiv_dir - scripts/stopdaemons.sh + su -c "sh scripts/stopdaemons.sh" -s /bin/sh www-data function_check postactiv_create_database postactiv_create_database @@ -423,7 +423,7 @@ function restore_local_postactiv { # start the daemons cd $postactiv_dir - scripts/startdaemons.sh + su -c "sh scripts/startdaemons.sh" -s /bin/sh www-data fi } @@ -455,7 +455,7 @@ function restore_remote_postactiv { # stop the daemons cd /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs - ./scripts/stopdaemons.sh + su -c "sh scripts/stopdaemons.sh" -s /bin/sh www-data function_check postactiv_create_database postactiv_create_database @@ -468,7 +468,7 @@ function restore_remote_postactiv { # start the daemons cd /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs - ./scripts/startdaemons.sh + su -c "sh scripts/startdaemons.sh" -s /bin/sh www-data fi } @@ -489,7 +489,7 @@ function remove_postactiv { fi if [ -f /var/www/$POSTACTIV_DOMAIN_NAME/htdocs/scripts/stopdaemons.sh ]; then cd /var/www/$POSTACTIV_DOMAIN_NAME/htdocs/scripts - ./scripts/stopdaemons.sh + su -c "sh scripts/stopdaemons.sh" -s /bin/sh www-data fi kill_pid=$(ps aux | grep /var/www/$POSTACTIV_DOMAIN_NAME/htdocs/scripts/queuedaemon.php | awk -F ' ' '{print $2}' | head -n 1) kill -9 $kill_pid diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index a72558fe..63cb812c 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -468,7 +468,7 @@ function gnusocial_hourly_script { 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 ' scripts/startdaemons.sh' >> /etc/cron.hourly/${gnusocial_type}-daemons + echo ' su -c "sh scripts/startdaemons.sh" -s /bin/sh www-data' >> /etc/cron.hourly/${gnusocial_type}-daemons echo 'fi' >> /etc/cron.hourly/${gnusocial_type}-daemons echo 'php scripts/delete_orphan_files.php > /dev/null' >> /etc/cron.hourly/${gnusocial_type}-daemons