[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Shutdown computer after a specific command has been executed



On Mon, 2013-12-09 at 17:42 +0600, Muntasim-Ul-Haque wrote:
> Hi,
> I need a tool that would make sure that, my computer would shutdown
> after a specific command has been executed. This tool would just wait
> for the Terminal for executing a command, like 'sudo apt-get upgrade'
> and then after the command has been executed, my computer would
> shutdown. Is that possible? Is there a tool or anything out there that
> can do this for me? Let me know. It would be of great help. Thanks in
> advance.
> Muntasim-Ul-Haque

One way would be to use a script that runs e.g. apt-get and then the
shutdown command.

#!/bin/sh
apt-get update
apt-get upgrade
shutdown -h now # or poweroff or halt



Reply to: