Re: Shutdown computer after a specific command has been executed
On Thu, 2013-12-12 at 18:57 +0400, Reco wrote:
> sudo sh -c "apt-get update && apt-get upgrade -y && poweroff"
>
> That's more like it. Depending on a hardware, 'shutdown -h now' can
> leave the power on.
:D We are close to solve it :D.
&& apt-get upgrade -y && poweroff
^^^^ if the upgrade fails, it won't shutdown, then
it won't go off-line and be a big issue for the OP.
sudo sh -c "apt-get update && apt-get dist-upgrade -y ; poweroff"
Reply to: