Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  16] [ 0]  / answers: 1 / hits: 15766  / 2 Years ago, fri, june 3, 2022, 3:54:08

I work on a ubuntu server located in a place where I don't usually go. I use ssh over openvpn to access it. The machine has multiple wired interfaces, many static routes and multiple default gateways to WAN. I frequently change interface adresses and routes. Most of the times the changes I do are temporarily--a reboot would reset the experiments I have done. In some cases some of those modifications have gone wrong, and the machine has gone offline. In such cases I had to call up someone at the place where the server is located to send the machine into a reboot.



Now I would like to schedule a reboot--lets say after 2 hours the machine should go into a reboot cycle. And in those two hours I can do whatever temporary experiments that I want. If all the temporary changes succeed then I should be able to prevent the "afer 2 hour" reboot from happening. So what I want is:




  1. How to tell the server to reboot after a certian time?

  2. If I decide that the machine should not go into a reboot, I should be able to cancel it.


More From » server

 Answers
6

On the terminal type shutdown -r 10 Waiting 10 minutes before the restart& that will make the server reboot in 10 mins, broadcast a message explaining that and pressing control+c will interrupt the reboot request.



On the terminal type shutdown -r 18:00 Rebooting at 18:00 hours& that will make the server reboot at 18:00 hours, will broadcast a message explaining that and can be interrupted with control+c.



You can also interrupt any shutdown / reboot request on your "working" terminal with shutdown -a.


[#43190] Saturday, June 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
torlim

Total Points: 408
Total Questions: 113
Total Answers: 110

Location: Estonia
Member since Wed, May 27, 2020
4 Years ago
;