<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 10 Mar 2019 at 08:50, Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I think it should be exiting if it sees a zero result from the pidof<br>
command. So maybe it should be changed to something like this:<br>
<br>
pidof mythfrontend.real 2>&1 >/dev/null<br>
pidof_retcode=$?<br>
if [ $pidof_retcode==0 ]; then<br>
wmctrl -a "MythTV Frontend" 2>/dev/null<br>
wmctrl_retcode=$?<br>
else<br>
wmctrl_retcode=1<br>
fi<br>
if [ pidof_retcode==0 || wmctrl_retcode==0 ]; then<br>
exit 0<br>
fi<br></blockquote><div><br></div><div>Thank you, that looks great.</div><div><br></div><div>It did cross my mind to change the logic there, but I was wary about the idea of going even further down the hole. Having thought about it a bit more, I think if Allen tests this by modifying the in situ mythfrontend.sh (after making a back-up for quick reversal, if necessary) and finds it solves the problem, then you (or I, if you would prefer not to spend the time doing it), can submit this as a patch to the mythbuntu team, which. if accepted, will mean a future upgrade won't cause him any issues.<br></div><div><br></div><div>Thanks again.</div><div><br></div><div>Cheers, Ian</div><div><br></div></div></div>