I added now a crontab reboot script to restart all services provided so far, these are the scripts:
Services:
http://tracker.killtube.org/
http://iznogod.killtube.org/ (depends on mariadb)
Code:
# install script:
# chmod +x onReboot.sh
# crontab -e
# add line: @reboot bash onReboot.sh &
# for some reason screen doesn't start without sleep
sleep 10
screen -AmdS kung_tracker
screen -S kung_tracker -p 0 -X stuff "cd tracker; ./tracker.sh
"
screen -AmdS mariadb
screen -S mariadb -p 0 -X stuff "cd mariadb; ./run.sh
"
screen -AmdS iznogod_tracker
screen -S iznogod_tracker -p 0 -X stuff "cd tracker_iznogod; ./tracker.sh
"
echo "screen restarted! $(date)" >> reboot_log.txt
haproxy user account:
Code:
# install script:
# chmod +x onReboot.sh
# crontab -e
# add line: @reboot bash onReboot.sh &
# for some reason screen doesn't start without sleep
sleep 10
screen -AmdS haproxy
screen -S haproxy -p 0 -X stuff "./haproxy.sh
"
echo "screen restarted! $(date)" >> reboot_log.txt
Since apache2 was always started on reboot, this was changed with:
Code:
update-rc.d -f apache2 remove
update-rc.d lighttpd enable
Just tried a reboot, seems to work nice so far to restart all services.
Any suggestions? Never did this restart-services-on-reboot-stuff, so no experience.