imgtec-ci20: genimage config/ u-boot env
[openadk.git] / package / cherokee / files / cherokee.init
blob592d852de040a4b64f40c671220a5c4477d9ce7d
1 #!/bin/sh
2 #PKG cherokee
3 #INIT 60
4 . /etc/rc.conf
6 case $1 in
7 autostop) ;;
8 autostart)
9 test x"${cherokee:-NO}" = x"NO" && exit 0
10 test x"$cherokee" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
11 exec sh $0 start
13 start)
14 [ ! -d /srv/www ] && echo "You need to create /srv/www/htdocs" && exit 1
15 mkdir -p /var/log/cherokee && chown cherokee.cherokee /var/log/cherokee
16 /usr/sbin/cherokee -d $cherokee_flags
18 stop)
19 kill $(pgrep -f /usr/sbin/cherokee)
21 restart)
22 sh $0 stop
23 sh $0 start
26 echo "usage: $0 {start | stop | restart}"
27 exit 1
28 esac
29 exit $?