[mythtv-users] Shutdown/Wakeup refinement

Nicolas Mainil nicolas.mainil at gmail.com
Thu Dec 30 13:21:34 UTC 2004


I got mythtv from cvs working nicely since a few weeks, the frontend
and the backend are on the same machine. When I power on my box it's
auto logging and launching the BE and the FE and thanks to
nvram-wakeup the BE shutdowns my box when idle and set wakeup time for
the next recording but when it auto starts for recording the FE is
automatically launched so the box doesn't shutdown after recording
until I manually exit the FE. The second problem is that when a
transcoding (or commercial flagging) job is started, if I exit the FE,
the BE will consider that it's idle and the transcoding (or commercial
flagging) job will be lost even if it was at 99% completion.

I thought about three ways to avoid the first problem :
1) Create a script that looks in the BE log file to figure out if it
was auto started or woken up by user and launch or not launch the FE
2) Read the nvram and don't launch the FE if wakeup time is near actual date
3) Create a daemon that kills the frontend if no actions are received
from the remote during a certain amount of time (and make sure it's
not doing playback)

For the second problem :
I saw that mythtv had a pre-shutdown command option and I thought I
could make a script that look at ps -A output to see if a job is
running and so avoid shutdown if a job is running

So my questions :
Are there any scripts existing that can make those things ?
If not, are these good ways to resolve my problems ?

More information about the mythtv-users mailing list