]> git.pld-linux.org Git - packages/anubis.git/commitdiff
- initscript for anubis
authorfilon <filon@sokrates.mimuw.edu.pl>
Tue, 11 Jun 2002 23:08:55 +0000 (23:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    anubis.init -> 1.1

anubis.init [new file with mode: 0644]

diff --git a/anubis.init b/anubis.init
new file mode 100644 (file)
index 0000000..857e791
--- /dev/null
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# Startup script for the DNS caching server
+#
+# chkconfig:   2345 81 45
+# description: Anubis is an outgoing mail processor, and the SMTP tunnel.
+# processname: anubis
+# config:      /etc/anubisrc
+
+# Set some frequently user variables
+SERVICE=anubis
+LOCKFILE=/var/lock/subsys/$SERVICE
+MSG="anubis remailer"
+PROG=$SERVICE
+
+# Source funtion library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Check that networking is up
+if is_no "$NETWORKING"; then
+       msg_Network_Down $MSG
+       exit 1
+fi
+
+# Get service config
+[ -f "/etc/sysconfig/$SERVICE" ] && . "/etc/sysconfig/$SERVICE"
+
+# See how we were called.
+case "$1" in
+  start)
+       if [ ! -f "$LOCKFILE" ]; then
+               msg_starting "$MSG"
+               daemon $PROG
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch $LOCKFILE
+       else
+               msg_Already_Running $MSG
+               exit 1
+       fi
+        ;;
+  stop)
+       if [ -f "$LOCKFILE" ]; then
+               msg_stopping "$MSG"
+               killproc $PROG
+               rm -f $LOCKFILE  >/dev/null 2>&1
+       else
+               msg_Not_Running "$MSG"
+               exit 1
+        fi
+        ;;
+  status)
+       status $PROG
+       exit $?
+       ;;
+  restart|reload)
+       $0 stop
+       $0 start
+       ;;
+  *)
+        msg_Usage "$0 {start|stop|restart|reload|status}"
+        exit 1
+esac
+
+exit $RETVAL
+
This page took 0.13885 seconds and 4 git commands to generate.