summaryrefslogtreecommitdiff
path: root/www/pserv/files/pserv.sh
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2003-10-17 08:11:55 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2003-10-17 08:11:55 +0000
commit148e621cf93c5996d66f69a43ed8e95e985439ff (patch)
tree3c1c6f9533ea58f6b3ec476deef054fb9d5f0d04 /www/pserv/files/pserv.sh
parent- Fix build (diff)
Add pserv 3.0.b1, a portable and small webserver written in C.
PR: ports/58119 Submitted by: Alex Dupre <sysadmin@alexdupre.com>
Diffstat (limited to 'www/pserv/files/pserv.sh')
-rw-r--r--www/pserv/files/pserv.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/www/pserv/files/pserv.sh b/www/pserv/files/pserv.sh
new file mode 100644
index 000000000000..9930e58c7886
--- /dev/null
+++ b/www/pserv/files/pserv.sh
@@ -0,0 +1,25 @@
+#!/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