Quote:
Originally Posted by Hermani
(Post 6129402)
Maybe I am just a fan of simple solutions. But I am still a n--b as well..
What is wrong with something like
Code:
> command_to_run && shutdown now
|
Mainly two issues here. First, as has already been previously stated, the shutdown must be issued as root, while the command_to_run is issued as normal user. Your solution does not address that.
Second, as I understand it, OP wants to shutdown after the job finishes. Your solution will only execute shutdown if the job finishes successfully, i.e., if the first command fails for some reason then the machine will not shutdown.
|