view debian/audiodb.init @ 277:abfb26e08d9c audiodb-debian

Merge trunk changes -r326:386 into audiodb-debian branch. Plus new debian/changelog version. (Should have used an epoch really, but couldn't be bothered; TODO: work out a sane version numbering policy).
author mas01cr
date Tue, 01 Jul 2008 09:12:40 +0000
parents e614ae0ebfe1
children
line wrap: on
line source
#! /bin/bash

test -f /usr/bin/audiodb || exit 0
. /lib/lsb/init-functions

RUNASUSER=nobody
PORT=20703

[ -f /etc/default/audiodb ] && . /etc/default/audiodb

case "$1" in
        start)
                log_begin_msg "Starting audiodb web service" "audiodb"
                start-stop-daemon --start --quiet --background \
                  --pidfile /var/run/audiodb.pid --make-pidfile \
                  --exec /usr/bin/audiodb --chuid ${RUNASUSER} -- -s ${PORT}
                log_end_msg $?
                ;;
        stop)
                log_begin_msg "Stopping audiodb web service" "audiodb"
                start-stop-daemon --stop --quiet --oknodo \
                  --pidfile /var/run/audiodb.pid
		ES=$?
		rm -f /var/run/audiodb.pid
		log_end_msg $ES
		;;
	reload)
		log_warning_msg "No configuration to reload for audiodb"
		;;
	restart|force-reload)
		"$0" stop
		exec "$0" start
		;;
	*)
		echo "Usage: $0 {start|stop|restart|force-reload}" >&2
		exit 1
		;;
esac

exit 0