Hi all
At the end of my daily cron jobs, (4am) I'm performing a reboot.
currently it does this regardless of machine status
I'd like to run it with a loop that will query 'mythshutdown --check' and proceed to reboot only if there is no recording or other activity in Mythtv. Return value 0 means ok to shutdown and value 1 means not.
Apologies for my very basic scripting knowledge as I'm sure this is very rudimentary, but here is what I have...
Code:
#!/bin/sh
while
mythshutdown --check
do
sleep 10
done
sudo reboot
Currently the script is working in reverse so I think I either need to specify the return value or approach in another way.
Any help greatly appreciated
Thanks