[mythtv-users] Mythwelcome always starts mythfrontend on boot.

Chris Simmons chris at simmons.titandsl.co.uk
Fri Sep 5 06:49:07 UTC 2008

James Skimming wrote:
> Hi Chris,
> You're correct, it needs to go through mythshutdown as it records the
> wakeup time in the database, which it presumably uses at wakeup. Run
> this SQL to see the setting in the database
> mysql -D mythconverg -u mythtv -p --execute="SELECT * FROM settings
> WHERE value = 'MythShutdownNextScheduled'"
> Here's my settings:
> Backend Settings
> ****************
> Wakeup time format: yyyy-MM-ddThh:mm:ss
> Set wakeuptime command: mythshutdown --setwakeup $time
> Server halt command: sudo mythshutdown --shutdown
> Pre Shutdown chack-command: mythshutdown --check
> MythWelcome/Shutdown settings
> *****************************
> Command to Set Wakeup Time: sudo /usr/bin/MythWakeSet "$time"
> Wakeup time format: yyyy-MM-dd hh:mm:ss
> nvram-wakeup Restart Command: <not set>
> Command to reboot: sudo shutdown -h -r now
> Command to shutdown: sudo poweroff
> Command to run Xterm: xterm
> Command to run to start the Frontend: /usr/bin/mythfrontend --logfile
> /var/log/mythtv/mythfrontend.log
> My /usr/bin/MythWakeSet is simply
> *************************************
> echo $1 > /proc/acpi/alarm
> Note the time formats, "mythshutdown --setwakeup" needs it like the W3C
> format for DateTime (with a "T" in the middle) "yyyy-MM-ddThh:mm:ss". My
> shutdown command needs it in the "yyyy-MM-dd hh:mm:ss" format but it
> looks like yours needs in time_t.
> Here's the guide I followed.
> https://help.ubuntu.com/community/MythTV/Install/WhatNext/ACPIWake
> It wasn't completely correct for me, the MythWakeSet script in the guide
> converts the date to UTC/GMT, whereas my system likes it in local time
> (something I found out when we went into BST this year).
> Let me know how you get on.
> Cheers,
> Jim.
> _______________________________________________
Thanks, that explains it :)  I'll just have to do some date munging then 
I guess.

My box auto started last night and I got this:-

Startup command: echo $status > /home/myth/restartStatus gave "auto" (correct)

 mythshutdown -p -v all says "looks like we were started manually1" (wrong!)

Oh dear...  Sounds like this is a bug to me, there's clearly two 
independent and different ways of determining if it was an auto start 
and mythshutdown gets it wrong unless you use it for everything, which 
is just extra hassle if you use RTC as then you have to do date 
munging.  Mythwelcome should be using the same logic as the backend is 
when invoking the Startup command.


More information about the mythtv-users mailing list