]> git.pld-linux.org Git - packages/cherokee.git/commitdiff
- created
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 31 Dec 2005 14:28:35 +0000 (14:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cherokee.init -> 1.1
    cherokee.sysconfig -> 1.1

cherokee.init [new file with mode: 0644]
cherokee.sysconfig [new file with mode: 0644]

diff --git a/cherokee.init b/cherokee.init
new file mode 100644 (file)
index 0000000..0af043b
--- /dev/null
@@ -0,0 +1,92 @@
+#!/bin/sh
+#
+# cherokee     Start the cherokee HTTP server.
+#
+# chkconfig:   345 20 80
+#
+# description: Cherokee is Fast, Flexible and Lightweight Web server
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/cherokee ] && . /etc/sysconfig/cherokee
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network ]; then
+               msg_network_down cherokee
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/cherokee ]; then
+               msg_starting cherokee
+#              daemon cherokee
+               start-stop-daemon --start --pidfile $PIDFILE -b --exec /usr/sbin/cherokee && ok || fail
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cherokee
+       else
+               msg_already_running cherokee
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/cherokee ]; then
+               # Stop daemons.
+               msg_stopping cherokee
+#              killproc cherokee
+               start-stop-daemon --stop --pidfile /var/run/cherokee.pid --oknodo --exec cherokee && ok || fail
+               rm -f /var/lock/subsys/cherokee
+       else
+               msg_not_running cherokee
+       fi
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  reload)
+       if [ -f /var/lock/subsys/cherokee ]; then
+               msg_reloading cherokee
+#              killproc --pidfile cherokee.pid cherokee -USR1
+               start-stop-daemon --stop --pidfile /var/run/cherokee.pid --signal USR1 --exec cherokee
+               RETVAL=$?
+       else
+               msg_not_running cherokee >&2
+               RETVAL=7
+       fi
+       ;;
+  reload-modules)
+       nls "Reloading %s modules" cherokee
+       start-stop-daemon --stop --pidfile /var/run/cherokee.pid --oknodo --retry 30
+       start-stop-daemon --start --pidfile /var/run/cherokee.pid --exec cherokee
+       ;;
+  force-reload)
+       $0 reload
+       exit $?
+       ;;
+  status)
+       status cherokee
+       RETVAL=$?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
+
+# This must be last line !
+# vi:syntax=sh
diff --git a/cherokee.sysconfig b/cherokee.sysconfig
new file mode 100644 (file)
index 0000000..0148852
--- /dev/null
@@ -0,0 +1,4 @@
+# Customized settings for Cherokee webserver
+
+# Define nice level for Cherokee
+#SERVICE_RUN_NICE_LEVEL="+0"
This page took 0.08294 seconds and 4 git commands to generate.