[mythtv-users] Can Myth postpone auto-shutdown til commercial flagging is done?

Petter Gundersen pettergundersen at gmail.com
Thu May 26 00:03:27 UTC 2005


On 5/26/05, Lane Schwartz <dowobeha at gmail.com> wrote:
> My main Myth system is a combo frontend/backend. I don't like leaving
> it on all the time.
> 
> It's set up to shut down when not in use, and wake up in time for the
> next recording using nvram-wakeup. It will auto-shutdown after 5
> minutes if the frontend is off and it's not recording anything (and no
> recording is about to start). This works fine.
> 
> But I'd like to set things up so that commercial flagging is
> considered "activity" for purposes of auto-shutdown.
> 

This is actually quite easy to accomplish. On the shutdown options
screen in mythtv-setup you can define a Pre Shutdown check-command.
Just create a script that checks if mythcommflag is running, and if so
let the script exit with exit status 1. Otherwise exit with exit
status 0. The script below is one way to do it.

-----8<------------------------------
#!/bin/sh
ps a | grep -v grep | grep -q mythcommflag && exit 1
exit 0

-----8<------------------------------


Regards,
Petter


More information about the mythtv-users mailing list