I've had some issues with mediatomb on Bubba recently which led to me uninstalling and reinstalling the package.
However this has led to me being unable to start mediatomb on boot.
When I run
Code: Select all
/etc/init.d/mediatomb start
I can successfully run
Code: Select all
mediatomb
Can anyone help me correct this?
My current /etc/init.d/mediatomb reads as follows:
Code: Select all
#! /bin/sh
#
# mediatomb initscript
#
#
# Author: Tor Krill <tor@excito.com>.
#
#
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="upnp media server"
NAME=Bubba
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=nobody
GROUP=nogroup
LOGFILE=/var/log/mediatomb
# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
D_ARGS="-c /etc/mediatomb/config.xml -d -u $USER -g $GROUP -P $PIDFILE -l $LOGF$
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
#
# Function that starts the daemon/service.
#
d_start() {
touch $PIDFILE
chown $USER:$GROUP $PIDFILE
touch $LOGFILE
chown $USER:$GROUP $LOGFILE
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $DAEMON -- $D_ARGS $DAEMON_OPTS
}
#
# Function that stops the daemon/service.
#
d_stop() {
start-stop-daemon --stop --signal 2 --retry 5 --quiet --pidfile $PIDFIL$
--name $NAME
}
#
# Function that sends a SIGHUP to the daemon/service.
#
d_reload() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--name $NAME --signal 1
}
ase "$1" in
start)
echo -n "Starting $DESC: $NAME"
/sbin/route add -net 239.0.0.0 netmask 255.0.0.0 eth0 >/dev/null 2>&1 |$
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
# reload|force-reload)
# echo -n "Reloading $DESC configuration..."
# d_reload
# echo "done."
# ;;
restart)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
# echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >$
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
Any help gratefully appreciated.
