uClibc-ng: update to 1.0.51
[openadk.git] / package / axtls / files / axhttpd.init
blob6991a0be453e01f215c59cf4204ec5b47b7251ba
1 #!/bin/sh
2 #PKG axhttpd
3 #INIT 80
4 . /etc/rc.conf
6 case $1 in
7 autostop) ;;
8 autostart)
9 test x"${axhttpd:-NO}" = x"NO" && exit 0
10 test x"$axhttpd" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
11 exec sh $0 start
13 start)
14 if [ ! -d /srv/www -a ! -h /srv/www ]; then
15 echo "axhttpd not started. create /srv/www first"
16 exit 0
18 /usr/sbin/axhttpd >>/var/log/axhttpd.access
20 stop)
21 kill $(pgrep -f axhttpd)
23 restart)
24 sh $0 stop
25 sh $0 start
28 echo "Usage: $0 {start | stop | restart}"
29 exit 1
31 esac
32 exit $?