[SATLUG] auto-reboot server
Alex Bartonek
bartonekdragracing at yahoo.com
Mon Oct 15 10:07:48 CDT 2007
Well my server is down at the house. I get the 'I'm
alive' emails every few hrs so I know its running.
Havent had any.. Is there another server? Is it
cheating... ok, seriously..
So it doesnt have internet access. This is a physical
machine now instead of a VMWare session (bought a
cheap $5 733mhz computer on base). I know its powered
on because I saw it this morning..but maybe a reboot
would fix it.
Simple cron job running as root to:
1. ping the outside world (yahoo.com or whatever)
2. If #1 fails then call reboot_it.sh, else exit
reboot_it.sh:
1. read file generated from #2 #3 below (there will
be dummy text files created when I initially design
this) to see if we've rebooted already today. If so
theres no need to reboot again because there is a
problem that a reboot cant fix.
2. write a keyword into a text file like "rebooted"
3. write current date time to txt file
4. init 6
Anything I'm missing? Confusing as hell?
-Alex
____________________________________________________________________________________
Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV.
http://tv.yahoo.com/
More information about the SATLUG
mailing list