2 # opendkim DomainKeys Identified Mail service
4 # description: OpenDKIM implements the DomainKeys Identified Mail (DKIM)
5 # service and a milter-based filter application that can plug
6 # in to any milter-aware MTA.
7 # processname: opendkim
8 # pidfile: /var/run/opendkim/opendkim.pid
9 # config: /etc/opendkim/opendkim.conf
11 # Source function library
12 . /etc/rc.d/init.d/functions
14 prog="/usr/sbin/opendkim"
17 sysconfig="/etc/sysconfig/$svname"
18 lockfile="/var/lock/subsys/$svname"
19 pidfile="/var/run/$svname/$svname.pid"
20 conffile="/etc/opendkim/$svname.conf"
23 [ -f $sysconfig ] && . $sysconfig
26 # Check if the service is already running?
27 if [ ! -f $lockfile ]; then
28 msg_starting "$svname"
29 daemon $prog -x $conffile -P $pidfile
31 [ $RETVAL -eq 0 ] && touch $lockfile
33 msg_already_running "$svname"
39 if [ -f $lockfile ]; then
40 msg_stopping "$svname"
41 killproc -p $pidfile $prog
43 rm -f $lockfile $pidfile >/dev/null 2>&1
45 msg_not_running "$svname"
50 if [ -f $lockfile ]; then
51 msg_reloading "$svname"
52 killproc -p $pidfile $prog -HUP
55 msg_not_running "$svname"
61 if [ ! -f $lockfile ]; then
62 msg_not_running "$svname"
71 # See how we were called.
87 status --pidfile $pidfile $svname
91 msg_usage "$0 {start|stop|restart|try-restart|status}"