]> git.pld-linux.org Git - packages/anubis.git/blob - anubis.init
- spelling fixes by Tomasz "Witek" Wittner <wittt_@poczta.onet.pl>
[packages/anubis.git] / anubis.init
1 #!/bin/sh
2 #
3 # Startup script for the DNS caching server
4 #
5 # chkconfig:    2345 81 45
6 # description:  Anubis is an outgoing mail processor, and the SMTP tunnel.
7 # processname:  anubis
8 # config:       /etc/anubisrc
9
10 # Set some frequently user variables
11 SERVICE=anubis
12 LOCKFILE=/var/lock/subsys/$SERVICE
13 MSG="anubis remailer"
14 PROG=$SERVICE
15
16 # Source funtion library
17 . /etc/rc.d/init.d/functions
18
19 # Get network config
20 . /etc/sysconfig/network
21
22 # Check that networking is up
23 if is_no "$NETWORKING"; then
24         msg_Network_Down $MSG
25         exit 1
26 fi
27
28 # Get service config
29 [ -f "/etc/sysconfig/$SERVICE" ] && . "/etc/sysconfig/$SERVICE"
30
31 # See how we were called.
32 case "$1" in
33   start)
34         if [ ! -f "$LOCKFILE" ]; then
35                 msg_starting "$MSG"
36                 daemon $PROG
37                 RETVAL=$?
38                 [ $RETVAL -eq 0 ] && touch $LOCKFILE
39         else
40                 msg_Already_Running $MSG
41                 exit 1
42         fi
43         ;;
44   stop)
45         if [ -f "$LOCKFILE" ]; then
46                 msg_stopping "$MSG"
47                 killproc $PROG
48                 rm -f $LOCKFILE  >/dev/null 2>&1
49         else
50                 msg_Not_Running "$MSG"
51                 exit 1
52         fi
53         ;;
54   status)
55         status $PROG
56         exit $?
57         ;;
58   restart|reload)
59         $0 stop
60         $0 start
61         ;;
62   *)
63         msg_Usage "$0 {start|stop|restart|reload|status}"
64         exit 1
65 esac
66
67 exit $RETVAL
68
This page took 0.078149 seconds and 3 git commands to generate.