]> git.pld-linux.org Git - packages/bopm.git/commitdiff
- initscript for BOPM
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 25 May 2005 18:40:51 +0000 (18:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bopm.init -> 1.1

bopm.init [new file with mode: 0644]

diff --git a/bopm.init b/bopm.init
new file mode 100644 (file)
index 0000000..42594ea
--- /dev/null
+++ b/bopm.init
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# bopm BOPM daemon.
+#
+# chkconfig: 345 80 30
+#
+# description: The Blitzed Open Proxy Monitor
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/bopm ] && . /etc/sysconfig/bopm
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network ]; then
+               msg_network_down bopm
+               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/bopm ]; then
+               msg_starting bopm
+               daemon --user bopm bopm
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bopm
+       else
+               msg_already_running bopm
+       fi
+       ;;
+stop)
+       if [ -f /var/lock/subsys/bopm ]; then
+               # Stop daemons.
+               msg_stopping bopm
+               killproc --pidfile bopm/bopm.pid bopm
+               rm -f /var/lock/subsys/bopm
+       else
+               msg_not_running bopm
+       fi
+       ;;
+restart|reload|force-reload)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+status)
+       status bopm
+       RETVAL=$?
+       ;;
+*)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=4:sw=4
This page took 0.063769 seconds and 4 git commands to generate.