Make the daemon script more generic
This commit is contained in:
parent
9b946e764a
commit
7446b83b08
|
@ -8443,7 +8443,10 @@ function install_gnu_social {
|
|||
echo '#!/bin/bash' > /etc/cron.hourly/gnusocial-daemons
|
||||
echo 'daemon_lines=$(ps aux | grep "scripts/queuedaemon.php" | grep "/var/www")' >> /etc/cron.hourly/gnusocial-daemons
|
||||
echo 'if [[ $daemon_lines != *"/var/www/"* ]]; then' >> /etc/cron.hourly/gnusocial-daemons
|
||||
echo " echo \"Restarting GNU Social daemons\" | mail -s \"GNU Social daemons not found\" $MY_EMAIL_ADDRESS" >> /etc/cron.hourly/gnusocial-daemons
|
||||
|
||||
echo " ADMIN_USER=$(cat $COMPLETION_FILE | grep 'Admin user' | awk -F ':' '{print \$2}')" >> /etc/cron.hourly/gnusocial-daemons
|
||||
echo ' MY_EMAIL_ADDRESS=$ADMIN_USER@$HOSTNAME' >> /etc/cron.hourly/gnusocial-daemons
|
||||
echo ' echo "Restarting GNU Social daemons" | mail -s "GNU Social daemons not found" $MY_EMAIL_ADDRESS' >> /etc/cron.hourly/gnusocial-daemons
|
||||
echo " cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs" >> /etc/cron.hourly/gnusocial-daemons
|
||||
echo ' scripts/startdaemons.sh' >> /etc/cron.hourly/gnusocial-daemons
|
||||
echo 'fi' >> /etc/cron.hourly/gnusocial-daemons
|
||||
|
|
Loading…
Reference in New Issue