[sf-lug] server reboot

Michael Paoli Michael.Paoli at cal.berkeley.edu
Sat Dec 31 21:03:13 PST 2016


Unless I'm in some great rush, I'm often more inclined to
do something like:
# (cd / && umask 022 && echo 'shutdown -r +2' | batch)

That at least gives anyone that happens to login between when
one checks if anyone's logged in, and start of the shutdown command
execution, a 2 minute warning.  It also allows oneself 2 minutes to
change one's mind ... "just in case".

I'll also often include reasonably informative message, e.g.:
# cd / && shutdown -r +10 '
> '`hostname`' rebooting to test [whatever...]
> '
#

> From: "Alex Kleider" <akleider at sonic.net>
> Subject: Re: [sf-lug] server reboot
> Date: Sat, 31 Dec 2016 15:07:57 -0800

> On 2016-12-31 11:57, Daniel Gimpelevich wrote:
>> (sleep 5 ; reboot) & exit
>
> Yes, this also works (although in my use case it required (sleep 5;  
> sudo reboot) & exit).
>
> Thanks, Daniel.




More information about the sf-lug mailing list