[mythtv-users] delaying mythbackend startup until a STB is available

Jerome Yuzyk jerome at supernet.ab.ca
Mon Feb 4 20:56:20 UTC 2019


Over the weekend I had a power outage. My MythTV BE/FE is on a 900VA UPS and 2 
ongoing recordings chugged merrily along until the UPS battery ran out - this 
was a serious outage. I don't use the soft-shutdown capabilities of my UPS 
monitor because outages aren't usually this long and it's a new UPS so I don't 
know how long it's good for. But Linux seems to be remarkably robust so I've 
never been zinged with problems after a power drop-out.

Upon power restoration the machine and my STBs restarted and one the 
previously-recording shows picked up on my SD STB. The other recording had 
ended during the outage.

But, mythbackend didn't see the HD STB because it takes a minute or so to 
reboot, way slower than the machine takes to start up. I had to manually 
restart mythbackend after the HD STB booted up.

So, I was wondering if there's a way to know, at boot time, if the boot is 
happening after a power loss (not a normal shutdown), so that I could then 
delay the start of mythbackend for a couple minutes after the machine reboots 
to let the HD STB get itself together.

Any ideas?

-- 
A little of Jerome's MythTV World: http://mythtv.bss.ab.ca




More information about the mythtv-users mailing list