There are various ways to automatically start a script on ubuntu. See http://askubuntu.com/questions/814/how-to-run-scripts-on-start-up
This script will be restarted each time, so you have to leave information about what to do next on your system.
Like writing to a file before rebooting and reading the status after restart.
If availability matters you'll need another machine monitoring the process.
BTW: Plz do not repost your question again!
| [reply] |
is it possible ? , I mean i have tried pulling in the command system('reboot') with loop statments but none seem to be working, it reboots once but the loop is not functional.
| [reply] |
Once the system reboots, the script is no longer running. You have to leave some kind of persistent information for the system to iterate the next step, probably create a file somewhere. You also have to configure the system to check for the information upon start-up.
| [reply] |
yeah, its kind of impossible until i modify my system to execute other commands in the startup, but is there a way to make the system or server sleep for say few secs and later pinging it to confirm that its active ?
Please help,
Thank you,
| [reply] |
Let me rephrase my question here again, i need to connect the system with ssh and then 1) the script should make the host to reboot 2) the script should ping for the Ip address after the reboot 3) once the host is back script should say host is up 4) then again script should start the reboot. is this possible ?
| [reply] |
Rebooting the machine WILL stop your running script. You'll have to set things up so that the script gets restarted on the next reboot.
| [reply] |