first rough-cut of a shairtunes ebuild.
This commit is contained in:
30
media-sound/shairport/files/shairport.initd
Normal file
30
media-sound/shairport/files/shairport.initd
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/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 $*
|
||||
}
|
||||
|
Reference in New Issue
Block a user