Ensure that any queue daemons are killed on removal

This commit is contained in:
Bob Mottram 2017-04-04 20:16:00 +01:00
parent c5b694a439
commit 256273e6b9
2 changed files with 5 additions and 0 deletions

View File

@ -437,6 +437,9 @@ function remove_gnusocial {
cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/scripts
./scripts/stopdaemons.sh
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
if [ -d /var/www/$GNUSOCIAL_DOMAIN_NAME ]; then
rm -rf /var/www/$GNUSOCIAL_DOMAIN_NAME
fi

View File

@ -415,6 +415,8 @@ function remove_postactiv {
cd /var/www/$POSTACTIV_DOMAIN_NAME/htdocs/scripts
./scripts/stopdaemons.sh
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
if [ -d /var/www/$POSTACTIV_DOMAIN_NAME ]; then
rm -rf /var/www/$POSTACTIV_DOMAIN_NAME