I am trying to restart my Centos 6.7 system using the command line:init 6But I need it stay down N number of seconds before starting back up again. I have been searching with Google, but I cannot by a variant of the init command that will do this.
How can I tell my system to shutdown, stay off for X seconds, then restart?
centos;init;reboot
As you are on Debian, you want the rtcwake utility.Manual pageNot good for very short sleeps (say less than 10 seconds) as it may take more time to put the system to sleep than that.The basic idea is that you program the RealTimeClock chip as a wake source for n seconds in the future and then suspend, either to ram or disk, or even switch the system off..