mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-13 23:36:08 +00:00
57dc407478
PR: ports/19870 Submitted by: Mikhail Teterin <mi@privatelabs.com>
25 lines
439 B
Bash
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
|