[mythtv-users] Carbon Footprint

Roger Siddons dizygotheca at ntlworld.com
Thu Sep 5 12:05:37 UTC 2013


On Wed, 04 Sep 2013 23:13:17 +0100, Daryl McDonald <darylangela at gmail.com>  
wrote:

>
> Did the log not identify that idle conditions were detected? There have  
> been times, days ago that I would open the frontend only to get a  
> >prompt, "could not connect to backend, is it running" my backend starts  
> automatically, so I would just close the front, open the back and close  
> it >again, and then the front would have no problems. It has become  
> apparent recently that there is a, much more simple, terminal command to  
> >start the backend, however I have already waited about one hour for  
> myth to shut itself down, a recording is scheduled for 19:00, about 45  
> >minutes from now. I will let you know how that turns out, and I'll  
> remove the other README~ after the current test concludes.
>
> Ciao, Daryl
>

If it hasn't shut down after 15 mins, I think it's safe to say it's never  
going to...

The issue is probably your checklogin.sh script. Assuming you're using the  
one from the wiki, I'm wondering if it's suitable for you.

I'm not entirely clear on how you are using your system (or your intended  
goal) so it would be useful if you would clarify exactly what you expect  
it to do.

For example, when my Mythbuntu system starts my user logs in automatically  
& starts Mythfrontend. When I've finished I exit Mythfrontend and the  
backend shuts the system down. The important point is that my single  
(desktop) user is still logged in when it shuts down. I believe the wiki  
checklogin.sh script won't do this. I *think* it requires you to log out  
of the desktop (back to the desktop login prompt) before it will shut  
down. When you're waiting a long time, are you actually doing this ? This  
may be what you want but it seems inconvenient to me, particularly from a  
remote.

If I want to use the desktop (ie. web browser/Skype etc.) I simply leave  
MythFrontend running in the background (I've disabled the 'new' Standby  
mode though - I'm not sure how that affects things).

However sometimes I need to use my machine for other stuff (maintenance  
etc.) and I log in via network from a laptop to do it. For this I need the  
checklogin script to prevent Myth from turning the box off until I've  
finished (& logged out).

I'm sure others will provide alternative usage scenarios but my point is:  
when do you want Myth to shut the box down & when do you want to prevent  
Myth from doing so ? You may not even need the checklogin.sh at all.

FWIW my version of checklogin.sh is;

#!/bin/bash
# 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

# Get a date/time stamp to add to log output
DATE=`date +%F\ %T\.%N`
DATE=${DATE:0:23}

if
   last | head | grep "still logged in"
   then
     echo $DATE Remote user is logged in, don\'t shut down!
     exit 1
   else
     echo $DATE No-one is logged in, ok to shut down.
     exit 0
fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130905/59462d54/attachment.html>


More information about the mythtv-users mailing list