]> git.pld-linux.org Git - packages/anubis.git/blame - anubis.init
- spelling fixes by Tomasz "Witek" Wittner <wittt_@poczta.onet.pl>
[packages/anubis.git] / anubis.init
CommitLineData
d4702dae 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
11SERVICE=anubis
12LOCKFILE=/var/lock/subsys/$SERVICE
13MSG="anubis remailer"
14PROG=$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
23if is_no "$NETWORKING"; then
24 msg_Network_Down $MSG
25 exit 1
26fi
27
28# Get service config
29[ -f "/etc/sysconfig/$SERVICE" ] && . "/etc/sysconfig/$SERVICE"
30
31# See how we were called.
32case "$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
65esac
66
67exit $RETVAL
68
This page took 0.063359 seconds and 4 git commands to generate.