#!/usr/bin/bash tail -n100 /var/log/mythtv/mythbackend.log | grep -q 'E Scheduler mythdbcon' db_good=$? if [ $db_good == 0 ]; then echo "restarting myth as I can DB errors" >> $LOG # echo "update settings set data='1370' where value='DBSchemaVer';" | mysql --user=mythtv --password=mythtv mythconverg sudo systemctl restart mythtv-backend # echo "update settings set data='1369' where value='DBSchemaVer';" | mysql --user=mythtv --password=mythtv mythconverg echo "restart completed" >> $LOG fi