diff options
Diffstat (limited to 'games/bnetd/files/bnetd.sh')
| -rw-r--r-- | games/bnetd/files/bnetd.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/games/bnetd/files/bnetd.sh b/games/bnetd/files/bnetd.sh new file mode 100644 index 000000000000..fe9cf99c7164 --- /dev/null +++ b/games/bnetd/files/bnetd.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + cd ${PREFIX}; [ -x sbin/bnetd -a -f bnetd/conf/bnetd.conf ] && sbin/bnetd -c bnetd/conf/bnetd.conf > /dev/null && echo -n ' bnetd' + ;; +stop) + killall bnetd && echo -n ' bnetd' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 |
