Earlier today, I had a problem with the system and had to reboot. Ran into a glitch where had to run fdsk, etc. and cleared out some orphaned files, screwed up inodes, etc, etc. Everything came out OK....except MythBackend does not start at boot via systemctl anymore. I can start MythBackend "manually" without any issues (except that I have to do it manually) but I can't figure out how to fix the systemctl scripts.
Here's what I see running `systemctl status mythtv-backend.service:
Code: Select all
● mythtv-backend.service - LSB: Start/Stop the MythTV server.
Loaded: loaded (/etc/init.d/mythtv-backend; enabled-runtime; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-06-01 18:04:30 EDT; 3h 35min ago
Docs: man:systemd-sysv-generator(8)
Process: 15970 ExecStart=/etc/init.d/mythtv-backend start (code=exited, status=127)
Jun 01 18:04:30 bugs systemd[1]: Starting LSB: Start/Stop the MythTV server....
Jun 01 18:04:30 bugs mythtv-backend[15970]: Starting MythTV server: mythbackend /etc/init.d/mythtv-backend: 54: /etc/init.d/mythtv-backend: start-stop
Jun 01 18:04:30 bugs systemd[1]: mythtv-backend.service: Control process exited, code=exited, status=127/n/a
Jun 01 18:04:30 bugs systemd[1]: mythtv-backend.service: Failed with result 'exit-code'.
Jun 01 18:04:30 bugs systemd[1]: Failed to start LSB: Start/Stop the MythTV server...
~
Code: Select all
#! /bin/sh
### BEGIN INIT INFO
# Provides: mythtv-backend
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: mysql
# Should-Stop: mysql
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/Stop the MythTV server.
### END INIT INFO
if [ -f /etc/default/locale ]; then
. /etc/default/locale
export LANG
fi
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/mythbackend
NAME="mythbackend"
DESC="MythTV server"
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
set -e
USER=mythtv
RUNDIR=/var/run/mythtv
ARGS="--daemon --pidfile $RUNDIR/$NAME.pid"
EXTRA_ARGS=""
NICE=0
if [ -f /etc/default/mythtv-backend ]; then
. /etc/default/mythtv-backend
fi
ARGS="$ARGS $EXTRA_ARGS"
mkdir -p $RUNDIR
chown -R $USER $RUNDIR
unset DISPLAY
unset SESSION_MANAGER
case "$1" in
start)
if test -e $RUNDIR/$NAME.pid ; then
echo "mythbackend already running, use restart instead."
else
echo -n "Starting $DESC: $NAME "
start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
--chuid $USER --nicelevel $NICE --exec $DAEMON -- $ARGS
echo "."
fi
;;
stop)
echo -n "Stopping $DESC: $NAME "
start-stop-daemon --stop --oknodo --pidfile $RUNDIR/$NAME.pid \
--chuid $USER --exec $DAEMON -- $ARGS
test -e $RUNDIR/$NAME.pid && rm $RUNDIR/$NAME.pid
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME "
start-stop-daemon --stop --oknodo --retry 10 --pidfile $RUNDIR/$NAME.pid \
--chuid $USER --exec $DAEMON -- $ARGS
echo "."
start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
--chuid $USER --nicelevel $NICE --exec $DAEMON -- $ARGS
echo "."
;;
reload)
start-stop-daemon --stop --oknodo --signal HUP --pidfile \
$RUNDIR/$NAME.pid --chuid $USER --exec $DAEMON -- $ARGS
echo "."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
Any suggestions/pointers for getting this working again?