diff options
author | Archie Cobbs <archie@FreeBSD.org> | 2005-09-20 19:31:01 +0000 |
---|---|---|
committer | Archie Cobbs <archie@FreeBSD.org> | 2005-09-20 19:31:01 +0000 |
commit | 3428afda0e4dfde4a2e4a6fe4763438ac970cf69 (patch) | |
tree | 8617d444a97fa3c90f70d69c8fd41840562aa734 /net/mpd4/files/mpd4.sh | |
parent | Fix the fix for CAN-2005-2495. (diff) |
New port for the development version of mpd.
Notes
Notes:
svn path=/head/; revision=143241
Diffstat (limited to 'net/mpd4/files/mpd4.sh')
-rw-r--r-- | net/mpd4/files/mpd4.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/net/mpd4/files/mpd4.sh b/net/mpd4/files/mpd4.sh new file mode 100644 index 000000000000..b267a10d13c5 --- /dev/null +++ b/net/mpd4/files/mpd4.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# $FreeBSD$ + +DAEMON=/usr/local/sbin/mpd4 +PIDFILE=/var/run/mpd4.pid + +case "$1" in +start) + if [ -f "${DAEMON}" -a -x "${DAEMON}" ]; then + if [ -f "${PIDFILE}" ]; then + echo ' mpd4 PID file found - not starting' + else + "${DAEMON}" -b -p "${PIDFILE}" + echo -n ' mpd4' + fi + else + echo ' "${DAEMON}" executable not found - mpd4 not starting' + fi + ;; +stop) + if [ -f "${PIDFILE}" ]; then + read -r pid junk < "${PIDFILE}" + kill ${pid} + else + echo ' mpd4 PID file not found - not killing' + fi + ;; +restart) + $0 stop + sleep 2 + $0 start + ;; +*) + echo "usage: ${0##*/} {start|stop|restart}" >&2 + ;; +esac + |