1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00
freebsd-ports/www/pserv/files/pserv.sh
Norikatsu Shigemura 148e621cf9 Add pserv 3.0.b1, a portable and small webserver written in C.
PR:		ports/58119
Submitted by:	Alex Dupre <sysadmin@alexdupre.com>
2003-10-17 08:11:55 +00:00

26 lines
387 B
Bash

#!/bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 64
fi
case "$1" in
start)
if [ -x ${PREFIX}/sbin/pserv ]; then
${PREFIX}/sbin/pserv > /dev/null &
echo -n ' pserv'
fi
;;
stop)
killall pserv > /dev/null 2>&1
echo -n ' pserv'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
exit 64
;;
esac
exit 0