]> git.pld-linux.org Git - packages/courier-authlib.git/commitdiff
- new
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 1 Sep 2005 13:34:57 +0000 (13:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    courier-authlib.init -> 1.1

courier-authlib.init [new file with mode: 0644]

diff --git a/courier-authlib.init b/courier-authlib.init
new file mode 100644 (file)
index 0000000..a0f7466
--- /dev/null
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+# courier-authlib      courier-authlib
+#
+# chkconfig:   345 85 15
+# description: courier-authlib 
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/courier-authlib ] && . /etc/sysconfig/courier-authlib
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+               # nls "ERROR: Networking is down. %s can't be run." <service>
+               msg_network_down courier-authlib
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/courier-authlib ]; then
+               msg_starting courier-authlib
+               daemon /usr/sbin/authdaemond
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-authlib
+       else
+               msg_already_running courier-authlib
+       fi
+       ;;
+  stop)
+       # Stop daemons.
+       if [ -f /var/lock/subsys/courier-authlib ]; then
+               msg_stopping courier-authlib
+               killproc authdaemond
+               rm -f /var/lock/subsys/courier-authlib >/dev/null 2>&1
+       else
+               msg_not_running courier-authlib
+       fi
+       ;;
+  status)
+       status authdaemond
+       RETVAL=$?
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       ;;
+  reload|force-reload|graceful)
+       if [ -f /var/lock/subsys/courier-authlib ]; then
+               msg_reloading courier-authlib
+               killproc authdaemond -HUP
+               RETVAL=$?
+       else
+               msg_not_running courier-authlib
+               RETVAL=7
+       fi
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|status}"
+       exit 3
+       ;;
+esac
+
+exit $RETVAL
This page took 0.109546 seconds and 4 git commands to generate.