mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-15 03:14:23 +00:00
2d3e091eb2
. Don't install everything in ${PREFIX}/dgd instead place the executables, docs and configuration in the standard places and place the example kernel 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 (need a 5.x RCng version as well). . Create a user to run the dgd service as (I'll reuse this user for ports of other mud drivers). . Add the games category as dgd is primarily used to write muds. . Bump PORTREVISION.
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
|