<div dir="ltr">Ian,<div><br></div><div>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.</div><div><br></div><div>Thanks!!!</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 18, 2015 at 5:57 AM, Ian Clark <span dir="ltr"><<a href="mailto:mrrooster@gmail.com" target="_blank">mrrooster@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 15 June 2015 at 02:25, Michael Wisniewski <<a href="mailto:mikewiz38@gmail.com">mikewiz38@gmail.com</a>> wrote:<br>
> I was wondering if anybody out there has a reboot or shutdown script that<br>
> would prevent it if the backend is recording.<br>
><br>
> There's been a few times where I'll do a reboot and then find out later that<br>
> myth was recording something, then the recording will fail.  I could<br>
> probably whip something together, but thought I would ask here to see if<br>
> somebody has already done this.<br>
><br>
</div></div>mythshutdown is your friend here....<br>
<br>
#!/bin/sh<br>
<br>
mythshutdown -c<br>
if [ "$?" == "0"]; then<br>
    shutdown -r now<br>
else<br>
  echo "shutdown blocked..."<br>
fi<br>
<br>
^-- untested, but basically that should work. Won't shutdown if it's<br>
recording or about to start recording.<br>
<br>
mythshutdown -c sets the return value to 0 if it's safe to shutdown.<br>
<br>
Cheers,<br>
<br>
Ian<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</div></div></blockquote></div><br></div>