]> git.pld-linux.org Git - packages/exim-lite.git/blob - exim.init
cdc20ac4ab8357d8cea56ca28c232b878b34d535
[packages/exim-lite.git] / exim.init
1 #!/bin/sh
2 #
3 # exim          This shell script takes care of starting and stopping
4 #               Exim.
5 #
6 # chkconfig:    2345 80 30
7 #
8 # description:  Exim is a Mail Transport Agent, which is the program \
9 #               that moves mail from one machine to another.
10 #
11 # processname:  exim
12 # config:       /etc/exim.cf
13 # pidfile:      /var/run/exim.pid
14
15
16 # Source function library
17 . /etc/rc.d/init.d/functions
18
19 # Get network config
20 . /etc/sysconfig/network
21
22 # Get service config
23 if [ -f /etc/sysconfig/hc-cron ]; then
24         . /etc/sysconfig/hc-cron
25 else
26         DAEMON=yes
27         QUEUE=1h
28 fi
29
30
31 # See how we were called.
32 case "$1" in
33   start)
34         # Check if the service is already running?
35         if [ ! -f /var/lock/subsys/exim ]; then
36                 show Starting exim
37                 daemon exim $([ "$DAEMON" = yes ] && echo -bd) \
38                         $([ -n "$QUEUE" ] && echo -q$QUEUE)
39         else
40                 echo "Exim already is running"
41         fi
42         touch /var/lock/subsys/exim
43         ;;
44   stop)
45         # Stop daemons.
46         show Shutting down exim:
47         killproc exim
48         rm -f /var/lock/subsys/exim
49         ;;
50   restart|reload)
51         $0 stop
52         $0 start
53         ;;
54   status)
55         status exim
56         ;;
57   *)
58         echo "Usage: $0 {start|stop|staus|restart|reload}"
59         exit 1
60 esac
61
62 exit 0
63
This page took 0.05337 seconds and 3 git commands to generate.