Script to restart gnusocial daemons if needed
This commit is contained in:
parent
c5b74fafff
commit
665fe8f761
|
@ -8439,6 +8439,16 @@ function install_gnu_social {
|
||||||
# update to the next commit
|
# update to the next commit
|
||||||
set_repo_commit /var/www/$MICROBLOG_DOMAIN_NAME/htdocs "GNU Social commit" "$MICROBLOG_COMMIT" $MICROBLOG_REPO
|
set_repo_commit /var/www/$MICROBLOG_DOMAIN_NAME/htdocs "GNU Social commit" "$MICROBLOG_COMMIT" $MICROBLOG_REPO
|
||||||
|
|
||||||
|
# add a script to check that the daemon is running
|
||||||
|
echo '#!/bin/bash' > /etc/cron.daily/gnusocial-daemons
|
||||||
|
echo 'daemon_lines=$(ps aux | grep "scripts/queuedaemon.php" | grep "/var/www")' >> /etc/cron.daily/gnusocial-daemons
|
||||||
|
echo 'if [[ $daemon_lines != *"/var/www/"* ]]; then' >> /etc/cron.daily/gnusocial-daemons
|
||||||
|
echo " echo \"Restarting GNU Social daemons\" | mail -s \"GNU Social daemons not found\" $MY_EMAIL_ADDRESS" >> /etc/cron.daily/gnusocial-daemons
|
||||||
|
echo " cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs" >> /etc/cron.daily/gnusocial-daemons
|
||||||
|
echo ' scripts/startdaemons.sh' >> /etc/cron.daily/gnusocial-daemons
|
||||||
|
echo 'fi' >> /etc/cron.daily/gnusocial-daemons
|
||||||
|
chmod +x /etc/cron.daily/gnusocial-daemons
|
||||||
|
|
||||||
if grep -Fxq "install_gnu_social" $COMPLETION_FILE; then
|
if grep -Fxq "install_gnu_social" $COMPLETION_FILE; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue