diff options
author | sem <sem@FreeBSD.org> | 2006-11-01 04:37:56 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2006-11-01 04:37:56 +0800 |
commit | 41c1b7eaa7d71b6428e96dc59194c1cb1500af7d (patch) | |
tree | d26fda0c1212ad28bb310d99407dcb6d0a9d3ffa /net/mpd4/files | |
parent | 0f05ce5fc100c5086b7a2d2b024390fa33b04b14 (diff) | |
download | freebsd-ports-gnome-41c1b7eaa7d71b6428e96dc59194c1cb1500af7d.tar.gz freebsd-ports-gnome-41c1b7eaa7d71b6428e96dc59194c1cb1500af7d.tar.zst freebsd-ports-gnome-41c1b7eaa7d71b6428e96dc59194c1cb1500af7d.zip |
- Update to 4.0b5
- Get rid of pkg-plist. It's dynamical now and respects NOPORTDOCS.
- rcNG'fy
PR: ports/92655 (based on)
Submitted by: maintainer, sat (PR)
Diffstat (limited to 'net/mpd4/files')
-rw-r--r-- | net/mpd4/files/mpd4.sh | 37 | ||||
-rw-r--r-- | net/mpd4/files/mpd4.sh.in | 45 |
2 files changed, 45 insertions, 37 deletions
diff --git a/net/mpd4/files/mpd4.sh b/net/mpd4/files/mpd4.sh deleted file mode 100644 index b267a10d13c5..000000000000 --- a/net/mpd4/files/mpd4.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/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 - diff --git a/net/mpd4/files/mpd4.sh.in b/net/mpd4/files/mpd4.sh.in new file mode 100644 index 000000000000..c6772ccfb593 --- /dev/null +++ b/net/mpd4/files/mpd4.sh.in @@ -0,0 +1,45 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: mpd +# REQUIRE: NETWORKING +# BEFORE: SERVERS + +# +# Add the following lines to /etc/rc.conf to enable mpd4: +# mpd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable mpd4. +# mpd_flags (string): Set to "-b" by default. +# Extra flags passed to start command. +# +# See mpd(8) for flags. +# + +. %%RC_SUBR%% + +name="mpd4" +rcvar=`set_rcvar mpd` + +load_rc_config ${name} + +: ${mpd_enable="NO"} +: ${mpd_flags="-b"} + +pidfile="/var/run/${name}.pid" +command="%%PREFIX%%/sbin/${name}" +required_files="%%PREFIX%%/etc/${name}/mpd.conf %%PREFIX%%/etc/${name}/mpd.links" + +case "${mpd_flags}" in +*-p\ *) + echo "ERROR: \$mpd_flags includes -p option." \ + "PID file is already set to $pidfile." + exit 1 + ;; +*) + command_args="${mpd_flags} -p ${pidfile}" + ;; +esac + +run_rc_command "$1" |