mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Add sample startup script.
This commit is contained in:
parent
ad07707ba0
commit
6d59990c70
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=94727
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= mpd
|
||||
PORTVERSION= 3.15
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
||||
MASTER_SITE_SUBDIR= archie
|
||||
@ -21,4 +22,7 @@ MANCOMPRESSED= maybe
|
||||
USE_OPENSSL= yes
|
||||
MAKE_ENV= COPTS=-I${OPENSSLINC} LDADD=-L${OPENSSLLIB}
|
||||
|
||||
post-install:
|
||||
@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/mpd.sh ${PREFIX}/etc/rc.d/mpd.sh.sample
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
37
net/mpd/files/mpd.sh
Normal file
37
net/mpd/files/mpd.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
DAEMON=/usr/local/sbin/mpd
|
||||
PIDFILE=/var/run/mpd.pid
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -f "${DAEMON}" -a -x "${DAEMON}" ]; then
|
||||
if [ -f "${PIDFILE}" ]; then
|
||||
echo ' mpd PID file found - not starting'
|
||||
else
|
||||
"${DAEMON}" -b -p "${PIDFILE}"
|
||||
echo -n ' mpd'
|
||||
fi
|
||||
else
|
||||
echo ' "${DAEMON}" executable not found - mpd not starting'
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if [ -f "${PIDFILE}" ]; then
|
||||
read -r pid junk < "${PIDFILE}"
|
||||
kill ${pid}
|
||||
else
|
||||
echo ' mpd PID file not found - not killing'
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 2
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: ${0##*/} {start|stop|restart}" >&2
|
||||
;;
|
||||
esac
|
||||
|
@ -2,6 +2,7 @@ etc/mpd/mpd.conf.sample
|
||||
etc/mpd/mpd.links.sample
|
||||
etc/mpd/mpd.secret.sample
|
||||
etc/mpd/mpd.script.sample
|
||||
etc/rc.d/mpd.sh.sample
|
||||
sbin/mpd
|
||||
share/doc/mpd/README
|
||||
share/doc/mpd/mpd.ps
|
||||
|
Loading…
Reference in New Issue
Block a user