Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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