[mythtv-users] 0.28 upgrade issue frontend connection
Bill Meek
keemllib at gmail.com
Mon Jul 18 22:39:02 UTC 2016
On 07/18/2016 05:26 PM, Douglas Peale wrote:
> Anyway, as soon as I figure out how to delay mythbackend starting until after the network is working, I should have a working
> system again.
This will make sure the HDHR's are up and has the side affect of
delaying 'til the network is up:
#!/bin/sh -
ATTEMPTS=20
LOG="/tmp/hdhomerun_config.log"
SLEEP_TIME=2
echo "\nStarting check for HD Homerun: $(date). " >> $LOG
for i in $(seq $ATTEMPTS); do
hdhomerun_config discover 2>&1 >> $LOG
if [ $? -eq 0 ]; then
echo "HD Homerun is up at: $(date)." >> $LOG
exit 0
fi
sleep $SLEEP_TIME
done
echo "Couldn't find the HD Homerun in $(expr \( $SLEEP_TIME + 1 \) \* $ATTEMPTS) seconds!" >> $LOG
exit 1
Then copy /lib/systemd/system/mythtv-backend.service to
/etc/systemd/system/mythtv-backend.service. Then add a line
like: ExecStartPre=wherever.you.put.the.script.above
to the file just copied. Do: sudo systemctl daemon-reload
Start the backend again as usual, e.g.
sudo systemctl start mythtv.backend
Don't forget to make the script executable.
If you don't want to verify that the HDHRs are up, just add:
ExecStartPre=/usr/bin/nm-online --quiet --timeout=5
Make sure you have nm-online 1st (server distributions don't.)
--
Bill
More information about the mythtv-users
mailing list