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
|
||||
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
|
||||
return
|
||||
fi
|
||||
|
@ -8733,7 +8743,7 @@ function install_gnu_social_plugin_sharings {
|
|||
cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/Sharings/locale/en_US/LC_MESSAGES
|
||||
msgfmt -o Sharings.mo Sharings.po
|
||||
|
||||
chown -R www-data:www-data /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
|
||||
chown -R www-data:www-data /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
|
||||
|
||||
if ! grep -q "GNU Social sharings plugin commit" $COMPLETION_FILE; then
|
||||
echo "GNU Social sharings plugin commit:$SHARINGS_COMMIT" >> $COMPLETION_FILE
|
||||
|
|
Loading…
Reference in New Issue