3 # cherokee Start the cherokee HTTP server.
7 # description: Cherokee is Fast, Flexible and Lightweight Web server
11 # Source function library
12 . /etc/rc.d/init.d/functions
15 . /etc/sysconfig/network
17 # Get service config - may override defaults
18 [ -f /etc/sysconfig/cherokee ] && . /etc/sysconfig/cherokee
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network ]; then
23 msg_network_down "Cherokee Web Server"
31 # Check if the service is already running?
32 if [ ! -f /var/lock/subsys/cherokee ]; then
33 msg_starting "Cherokee Web Server"
35 # it offers no stdout/stderr logging. workaround
36 exec 2>>/var/log/cherokee/cherokee.log
38 start-stop-daemon --start --pidfile /var/run/cherokee.pid --oknodo -b --exec /usr/sbin/cherokee
41 if [ $RETVAL -eq 0 ]; then
42 touch /var/lock/subsys/cherokee
48 msg_already_running "Cherokee Web Server"
53 if [ -f /var/lock/subsys/cherokee ]; then
55 msg_stopping "Cherokee Web Server"
56 start-stop-daemon --stop --pidfile /var/run/cherokee.pid --oknodo --exec /usr/sbin/cherokee
58 if [ $RETVAL -eq 0 ]; then
59 rm -f /var/lock/subsys/cherokee >/dev/null 2>&1
65 msg_not_running "Cherokee Web Server"
70 if [ -f /var/lock/subsys/cherokee ]; then
74 msg_not_running "Cherokee Web Server"
80 # See how we were called.
103 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"