mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-24 09:25:01 +00:00
28 lines
487 B
Bash
28 lines
487 B
Bash
|
#!/bin/sh
|
||
|
# $FreeBSD$
|
||
|
|
||
|
DGD_CONF=%%PREFIX%%/etc/dgd/kernel.dgd
|
||
|
DGD_USER=mud
|
||
|
DGD=%%PREFIX%%/sbin/dgd
|
||
|
DGD_LOG=%%DATADIR%%/kernel.log
|
||
|
DGD_PID=/var/run/dgd.pid
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
if [ -x "${DGD}" ]; then
|
||
|
su ${DGD_USER} -c "${DGD} ${DGD_CONF}" >> "${DGD_LOG}" 2>&1 &
|
||
|
echo $(($!+1)) > "${DGD_PID}"
|
||
|
echo -n ' dgd'
|
||
|
fi
|
||
|
;;
|
||
|
stop)
|
||
|
kill -TERM `cat "${DGD_PID}"` && rm -f "${DGD_PID}"
|
||
|
;;
|
||
|
*)
|
||
|
echo ""
|
||
|
echo "Usage: `basename $0` { start | stop }"
|
||
|
echo ""
|
||
|
exit 64
|
||
|
;;
|
||
|
esac
|