alpha-quadrant/media-sound/shairport/files/shairport.initd
2011-07-06 08:22:05 +02:00

31 lines
605 B
Plaintext

#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
NAME="shairport"
DAEMON="/usr/bin/shairport.pl"
DAEMON_ARGS=""
PIDFILE="/var/run/${NAME}.pid"
depend() {
need net
use avahi-daemon
}
start() {
ebegin "Starting shairport"
start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
--user audio --exec "$DAEMON" -b --oknodo -- $DAEMON_ARGS
eend $*
}
stop() {
ebegin "Shutting down shairport"
start-stop-daemon --stop --quiet --pidfile "$PIDFILE" \
--retry 1 --oknodo
eend $*
}