summaryrefslogtreecommitdiff
path: root/www/tclhttpd/files/tclhttpd.sh
diff options
context:
space:
mode:
authorNeil Blakey-Milner <nbm@FreeBSD.org>2000-07-20 11:55:59 +0000
committerNeil Blakey-Milner <nbm@FreeBSD.org>2000-07-20 11:55:59 +0000
commit57dc4074781928326a3104161fddcc5f4ad4be3d (patch)
treecf969785f780c3d8681059a202fc23886d530d44 /www/tclhttpd/files/tclhttpd.sh
parentPrevent attempting to build with Python support if Python just happens to (diff)
Add tclhttpd, a pure-Tcl implementation of a HTTP server.
PR: ports/19870 Submitted by: Mikhail Teterin <mi@privatelabs.com>
Notes
Notes: svn path=/head/; revision=30920
Diffstat (limited to 'www/tclhttpd/files/tclhttpd.sh')
-rw-r--r--www/tclhttpd/files/tclhttpd.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/www/tclhttpd/files/tclhttpd.sh b/www/tclhttpd/files/tclhttpd.sh
new file mode 100644
index 000000000000..bba81a73cb35
--- /dev/null
+++ b/www/tclhttpd/files/tclhttpd.sh
@@ -0,0 +1,24 @@
+#!/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