Absurd Minds http://forums.absurdminds.net/ |
|
How to reboot server weekly http://forums.absurdminds.net/viewtopic.php?f=58&t=1268 |
Page 1 of 1 |
Author: | Amaroq [ 22 Mar 2012 13:37 ] |
Post subject: | How to reboot server weekly |
I want to write some scripts that will reboot the server machine every week at a certain time. When the server reboots, I need it to load all the servers in their appropriate screens. How can I do something like this? |
Author: | jero [ 22 Mar 2012 14:17 ] |
Post subject: | Re: How to reboot server weekly |
in /etc/crontab For the server to reboot at 4AM every wednesday (Day of Week 0=Sun, 7= Sat) 00 4 * * 3 root /usr/bin/reboot To start the servers upon reboot in the same file (/etc/crontab) @reboot gamer screen -A..... or the path to the shell script not sure if the script will fail if it doesn't find the screen to kill. Testing needed. |
Author: | Amaroq [ 23 Mar 2012 21:17 ] |
Post subject: | Re: How to reboot server weekly |
Quote: To start the servers upon reboot in the same file (/etc/crontab)
So I would need one screen for each of the servers? And thus a seperate line starting with @reboot gamer... for each?@reboot gamer screen -A..... or the path to the shell script I have a different shell script that calls a kill screen which still works even if the screen doesn't exist, so I think it would work to just write a path to the script. @reboot gamer /home/gamer/cstrike/pub/pub.sh |
Author: | jero [ 23 Mar 2012 21:21 ] |
Post subject: | Re: How to reboot server weekly |
yes |
Page 1 of 1 | All times are UTC-04:00 |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |