Skip to content

Instantly share code, notes, and snippets.

@mitchellurgero
Created July 26, 2017 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchellurgero/e914c6109d0ad31fd85bf6d4dbb7e1f1 to your computer and use it in GitHub Desktop.
Save mitchellurgero/e914c6109d0ad31fd85bf6d4dbb7e1f1 to your computer and use it in GitHub Desktop.
GNU Social Queue Daemon Systemd Unit File & cron
crontab -e
Add:
0 0 * * * /bin/bash /root/restartqueue.sh
(Make sure to change for your setup
[Unit]
Description=GNUSocial queue Daemons
Wants=mysql.service rabbitmq-server.service
After=network.target mysql.service rabbitmq-server.service
[Service]
User=www-data
Group=www-data
Type=forking
ExecStart=/var/www/html/scripts/startdaemons.sh
ExecStop=/var/www/html/scripts/stopdaemons.sh
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
#!/bin/bash
systemctl stop gnusocial.service
systemctl stop mysql.service
systemctl restart rabbitmq-server.service
systemctl restart apache2.service
systemctl start mysql.service
systemctl start gnusocial.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment