[mythtv-users] Backend Reboot Script

Michael Wisniewski mikewiz38 at gmail.com
Fri Jun 19 12:27:58 UTC 2015


Ian,

Wow, thanks for this.  I didn't even know mythshutdown existed.  I could
add that into a script and figure it out, instead of trying to do a curl to
the mythweb URL and doing something fancy like that.

Thanks!!!


On Thu, Jun 18, 2015 at 5:57 AM, Ian Clark <mrrooster at gmail.com> wrote:

> On 15 June 2015 at 02:25, Michael Wisniewski <mikewiz38 at gmail.com> wrote:
> > I was wondering if anybody out there has a reboot or shutdown script that
> > would prevent it if the backend is recording.
> >
> > There's been a few times where I'll do a reboot and then find out later
> that
> > myth was recording something, then the recording will fail.  I could
> > probably whip something together, but thought I would ask here to see if
> > somebody has already done this.
> >
> mythshutdown is your friend here....
>
> #!/bin/sh
>
> mythshutdown -c
> if [ "$?" == "0"]; then
>     shutdown -r now
> else
>   echo "shutdown blocked..."
> fi
>
> ^-- untested, but basically that should work. Won't shutdown if it's
> recording or about to start recording.
>
> mythshutdown -c sets the return value to 0 if it's safe to shutdown.
>
> Cheers,
>
> Ian
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150619/09b34234/attachment.html>


More information about the mythtv-users mailing list