[mythtv] here is a debian version of /etc/init.d/mythbackend
Simon Kenyon
simon at koala.ie
Fri Sep 26 11:00:44 EDT 2003
subject says it all
hope it is of use to somebody
--
simon
-----------------cut here------------------------
#! /bin/sh
#
# Starts the mythbackend as a daemon (Debian version)
#
# Copyright (c) 2003 by Simon Kenyon <simon at koala dot ie>
#
# With thanks to:
# Miquel van Smoorenburg <miquels at cistron dot nl>
# Ian Murdock <imurdock at gnu dot ai dot mit dot edu>
# Michael Thomson <linux at m-thomson dot net>
# Stu Tomlinson <stu at nosnilmot dot com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=mythbackend
DAEMON=/usr/local/bin/mythbackend
LOGFILE="/var/log/$NAME.log"
test -x $DAEMON || exit 0
#set -e
case "$1" in
start)
echo -n "Starting: $NAME"
start-stop-daemon --start --quiet --make-pidfile --pidfile \
/var/run/$NAME.pid --background --exec $DAEMON -- -l
${LOGFILE}
echo "."
;;
stop)
echo -n "Stopping: $NAME"
start-stop-daemon --stop --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
rm -f /var/run/$NAME.pid
echo "."
;;
restart)
echo -n "Restarting: $NAME"
start-stop-daemon --stop --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
rm -f /var/run/$NAME.pid
sleep 1
start-stop-daemon --start --quiet --make-pidfile --pidfile \
/var/run/$NAME.pid --background --exec $DAEMON -- -l
${LOGFILE}
echo "."
;;
*)
N=/etc/init.d/${NAME}
echo "Usage: $N {start|stop|restart}" >&2
exit 1
;;
esac
exit 0
More information about the mythtv-dev
mailing list