diff options
author | Chris D. Faulhaber <jedgar@FreeBSD.org> | 2000-07-14 01:55:13 +0000 |
---|---|---|
committer | Chris D. Faulhaber <jedgar@FreeBSD.org> | 2000-07-14 01:55:13 +0000 |
commit | 3ffee985dbb2eb56ea09159636c447be92d4af48 (patch) | |
tree | 0f2f560826fe143f106812be89ddcd2b14af08be /www/fhttpd/files | |
parent | 5dc81de480ba7216e42732cca80e4b95ecc1d005 (diff) | |
download | ports-3ffee985dbb2eb56ea09159636c447be92d4af48.tar.gz ports-3ffee985dbb2eb56ea09159636c447be92d4af48.zip |
Convert startup script to {start|stop} usage
Notes
Notes:
svn path=/head/; revision=30596
Diffstat (limited to 'www/fhttpd/files')
-rw-r--r-- | www/fhttpd/files/fhttpd.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/www/fhttpd/files/fhttpd.sh b/www/fhttpd/files/fhttpd.sh index 51bbd8b71eeb..916f6e763f84 100644 --- a/www/fhttpd/files/fhttpd.sh +++ b/www/fhttpd/files/fhttpd.sh @@ -1,2 +1,20 @@ #!/bin/sh -[ -x /usr/local/sbin/fhttpd ] && /usr/local/sbin/fhttpd -c /usr/local/etc/fhttpd.conf -l /usr/local/share/fhttpd/fhttpd.log >/dev/null 2>&1 && echo -n " fhttpd" + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + [ -x ${PREFIX}/sbin/fhttpd ] && ${PREFIX}/sbin/fhttpd -c ${PREFIX}/etc/fhttpd.conf -l ${PREFIX}/share/fhttpd/fhttpd.log > /dev/null 2>&1 && echo -n ' fhttpd' + ;; +stop) + killall fhttpd && echo -n ' fhttpd' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 |