[mythtv-users] finish current job and shutdown?

Dirk Aust dirk_aust at gmx.de
Mon Nov 14 20:36:49 UTC 2011

I have a small script that has been configured to be called when the backend want's to shut down, it 
simply tests among other things whether a "mythtranscode" process is running and then denies the 
shutdown. The backend tries again after it's normal timeout, so when the transcode processis not 
running any more, the backend goes down.

#! /bin/sh
# Check to see if anyone is currently logged in. Return zero if not and 1 if so.
# Echoed text appears in log file. It can be removed and --quiet added to the 
# grep command once you are satisfied that mythTV is working properly
  last | grep "still logged in"
      echo Someone is still logged in! Don\'t shut down!
      exit 1
elif /sbin/checkproc /usr/bin/mythtranscode 
      echo "Mythtranscode luft noch!"
      exit 1
elif /bin/ping -c 3 pc1 || /bin/ping -c 3 pc2
      echo "Wohl noch nfs exporte."
      exit 1
      echo Noone is logged in, ok to shut down.
      exit 0

Am Sonntag, 13. November 2011 schrieb Thomas Boehm:
> Hi list,
> is there a way to let my backend shutdown after the currently running
> (user)job finishes?
> I setup mythwelcome on my backend to shutdown when there are no
> recordings and when no frontend is connected and to wake up when there
> is a recording about to start.
> Now I want the backend not to wait until all jobs have finished. I'd
> rather have it finish the currently running job and shutdown and
> continue the job queue the next time it wakes up.
> Did anybody find a way to do this? If I could add a userscript to the
> job queue from the command line I could maybe build a script to read the
> user jobs from a file and add them one by one to the job queue with a
> delay greater than the idle time...
> Any suggestions?
> Thanks
> Thomas
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

More information about the mythtv-users mailing list