[mythtv-users] shutting down
askvictor at gmail.com
Thu Oct 25 07:28:21 UTC 2007
On 10/20/07, Ma Begaj <derliebegott at gmail.com> wrote:
> your ACPI daemon catches the buttons and runs the commands you want.
> You can do it this way:
> mythshutdown -s 1 -v all | grep 'status returned: 0' >/dev/null
> if [ $? == 0 ]; then
> shutdown -h now
Looking back at this, it seems a cleaner way to do this would be:
if [ mythshutdown -s ]; then
shutdown -h now
since mythshutdown -s returns 0 if it's idle, which equates to true in bash.
But then I'm just an efficiency geek.
More information about the mythtv-users