mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-18 03:46:03 +00:00
617878070a
. Don't install everything in ${PREFIX}/dgd instead place the executables, docs and configuration in the standard places and place the mudlib in DATADIR. . Don't use the packing list as a list of things to install. . Fix up the configuration file to point to the install locations. . Add a sample rc script which can be used to start and stop dgd with this mudlib (need a 5.x RCng version as well). . Create a user to run the dgd service as (this is the same user as used by the net/dgd port). . More standard Makefile. . Add a post-extract target which removes the need for do-build. . Add a do-configure target and remove the obsolete configure script. . Remove devel from CATEGORIES, it really doesn't belong. This port should really just be in games, but thats another story. . Catch up dependencies with changes to net/dgd.
34 lines
729 B
Bash
34 lines
729 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
DGD_CONF=%%PREFIX%%/etc/dgd-lpmud/lpmud.dgd
|
|
DGD_USER=mud
|
|
DGD=%%PREFIX%%/sbin/dgd
|
|
DGD_HNAME=%%PREFIX%%/bin/lpmud-hname
|
|
DGD_HNAME_PORT=6047
|
|
DGD_HNAME_PASSWD=HNAMEPASS
|
|
DGD_LOG=%%DATADIR%%/lpmud/log/lpmud.log
|
|
DGD_PID=/var/run/dgd-lpmud.pid
|
|
|
|
case "$1" in
|
|
start)
|
|
if [ -x "${DGD}" ]; then
|
|
su ${DGD_USER} -c "${DGD_HNAME} ${DGD_HNAME_PORT} ${DGD_HNAME_PASSWD}" > /dev/null 2>&1 &
|
|
sleep 1
|
|
su ${DGD_USER} -c "${DGD} ${DGD_CONF}" >> "${DGD_LOG}" 2>&1 &
|
|
echo $(($!+1)) > "${DGD_PID}"
|
|
echo -n ' dgd-lpmud'
|
|
fi
|
|
;;
|
|
stop)
|
|
kill -TERM `cat "${DGD_PID}"` && rm -f "${DGD_PID}"
|
|
killall -TERM lpmud-hname
|
|
;;
|
|
*)
|
|
echo ""
|
|
echo "Usage: `basename $0` { start | stop }"
|
|
echo ""
|
|
exit 64
|
|
;;
|
|
esac
|