1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-07 22:58:11 +00:00
freebsd-ports/www/tclhttpd/files/tclhttpd.sh
Neil Blakey-Milner 57dc407478 Add tclhttpd, a pure-Tcl implementation of a HTTP server.
PR:		ports/19870
Submitted by:	Mikhail Teterin <mi@privatelabs.com>
2000-07-20 11:55:59 +00:00

25 lines
439 B
Bash

#!/bin/sh
PID_FILE=/var/run/tclhttpd.pid
case $1 in
stop)
if [ -e $PID_FILE ] ; then
PID=`cat $PID_FILE`
if kill $PID ; then
exec rm -f $PID_FILE
fi
else
echo "No $PID_FILE presenet, tclhttpd is, probably, not running" > /dev/stderr
fi
;;
''|start)
COMMAND_LINE &
sleep 2
if kill -0 $! ; then
echo -n ' tclhttpd'
echo $! > $PID_FILE
else
exec logger -s "tclhttpd failed to start"
fi
;;
esac