2007-07-17 02:23:31 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
|
|
NAME=tinyhttpd
|
|
|
|
|
|
|
|
test -x /usr/sbin/$NAME || exit 0
|
|
|
|
mkdir -p /var/www
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Starting $NAME: "
|
2007-07-17 02:23:31 +02:00
|
|
|
$NAME > /dev/null &
|
|
|
|
echo "done"
|
|
|
|
;;
|
|
|
|
stop)
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Stopping $NAME: "
|
2007-07-17 02:23:31 +02:00
|
|
|
killall -9 $NAME
|
|
|
|
echo "done"
|
|
|
|
;;
|
|
|
|
restart)
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Restarting $NAME: "
|
2007-07-17 02:23:31 +02:00
|
|
|
killall -9 $NAME
|
|
|
|
sleep 1
|
|
|
|
$NAME > /dev/null &
|
|
|
|
echo "done"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: /etc/init.d/S85tinyhttpd {start|stop|restart}" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|