<div dir="ltr"><div><div>@Bill, @Jan: Thanks for the info. Both methods work great, and allow me to integrate frontend status into my script.<br><br></div>Between querying the Frontend, and the mythtv-status command, I can monitor mythtv usage from the command line :)<br>
<br></div>-Robert<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 5, 2014 at 1:13 AM, Jan Ceuleers <span dir="ltr"><<a href="mailto:jan.ceuleers@gmail.com" target="_blank">jan.ceuleers@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="">On 05/04/2014 10:29 PM, R Kannan wrote:<br>
> @Hika: I'd like to write a shell script that will automatically update the<br>
> system when mythbackend is idle (not recording, and no mythfrontend usage).<br>
<br>
</div>Here is some inspiration for you:<br>
<br>
#!/bin/bash<br>
nc fe3 6546 -i 1 > /tmp/frontendStatus.out <<EOS<br>
query location<br>
quit<br>
EOS<br>
<br>
! tail -2 < /tmp/frontendStatus.out | grep -e "# Playback" > /dev/null<br>
<br>
What this shows is how to ask a frontend what it's doing. This<br>
particular script is only interested in the Playback state, but more<br>
options are available:<br>
<br>
<a href="http://www.mythtv.org/wiki/Frontend_control_socket" target="_blank">http://www.mythtv.org/wiki/Frontend_control_socket</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Jan<br>
</font></span><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://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a><br>
</div></div></blockquote></div><br></div>