Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Where do you put script that stops automatic shutdown?

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


nospam312 at gmail

Jan 31, 2008, 7:43 AM

Post #1 of 4 (959 views)
Permalink
Where do you put script that stops automatic shutdown?

I am using mythwelcome and mythshutdown via ACPI and everything works
fine apart from I want to stop the automatic shutdown by writing a
script and usw exit codes as specified on this page
http://www.mythtv.org/wiki/index.php/Shutdown_Wakeup to stop it
shutting down.

Currently my Pre Check command is set to "mythshutdown --check" (no quotes).

What and where do I call my script that check for example a running
telnet session and does mythshutdown automatically find it? I think I
have confused myself.

TIA
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


philledwards at gmail

Jan 31, 2008, 1:41 PM

Post #2 of 4 (890 views)
Permalink
Re: Where do you put script that stops automatic shutdown? [In reply to]

> What and where do I call my script that check for example a running
> telnet session and does mythshutdown automatically find it? I think I
> have confused myself.

Write a shell script and put it somewhere in /usr/local/bin. Call it
whatever you like - eg myth_pre_shut.sh. Make sure it's executable and
returns the return codes as specified on
http://www.mythtv.org/wiki/index.php/Shutdown_Wakeup

Run mythtvsetup and in the Pre Shutdown check-command field type in
/usr/local/bin/myth_pre_shut.sh

Then when Mythshutdown runs it will execute this shell script first
and depending on the return value will either proceed or abort the
shutdown.

One thing I'm not sure of with this is whether mythbackend will run
mythshutdown again at a later time. I have a feeling that once it's
decided the shutdown can't proceed it won't try again so the box will
never shut down unless mythbackend is restarted and it runs the
mythshutdown check again. I believe this is how it used to behave, but
am not sure with the current version.

Regards,
Phill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


gharris+list+mythtv at eklo

Jan 31, 2008, 1:48 PM

Post #3 of 4 (888 views)
Permalink
Re: Where do you put script that stops automatic shutdown? [In reply to]

On Jan 31, 2008 4:41 PM, Phill Edwards <philledwards [at] gmail> wrote:
>
> > What and where do I call my script that check for example a running
> > telnet session and does mythshutdown automatically find it? I think I
> > have confused myself.
>
> One thing I'm not sure of with this is whether mythbackend will run
> mythshutdown again at a later time. I have a feeling that once it's
> decided the shutdown can't proceed it won't try again so the box will
> never shut down unless mythbackend is restarted and it runs the
> mythshutdown check again. I believe this is how it used to behave, but
> am not sure with the current version.

I use a similar script to check for various things on the backend
(slimserver clients, ssh sessions, transcoding, etc). When the script
tells mythbackend that the system is still busy, mythbackend just
restarts its idle countdown - on my system that is 60 seconds, which
means the check script will be run every 60 seconds until it gives the
all clear.

--Glenn
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


nospam312 at gmail

Feb 19, 2008, 1:23 PM

Post #4 of 4 (827 views)
Permalink
Re: Where do you put script that stops automatic shutdown? [In reply to]

> Run mythtvsetup and in the Pre Shutdown check-command field type in
> /usr/local/bin/myth_pre_shut.sh

I think this is sort of working for me but the Pre Shutdown Check
command was originally set to "mythshutdown --check".

Do I need to make my script run "mythshutdown --status" and review its
return code also now as it appears it is not honouring my global Daily
WakeUp/Shutdown settings set in mythwelcome anymore?

TIA
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.