3 # postgrey Postfix Greylisting Policy Server
5 # chkconfig: 2345 79 31
6 # description: Postfix Greylisting Policy Server
8 # processname: postgrey
9 # pidfile: /var/run/postgrey.pid
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
18 OPTIONS="--unix=/var/spool/postfix/postgrey/socket"
21 [ -f /etc/sysconfig/postgrey ] && . /etc/sysconfig/postgrey
23 OPTIONS="$OPTIONS $POSTGREY_OPTS"
25 # Check that networking is up.
26 if is_yes "${NETWORKING}"; then
27 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
28 msg_network_down postgrey
37 # See how we were called.
40 # Check if the service is already running?
41 if [ ! -f /var/lock/subsys/postgrey ]; then
43 daemon /usr/sbin/postgrey -d --pidfile=/var/run/postgrey.pid $OPTIONS
45 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/postgrey
47 msg_already_running postgrey
51 if [ -f /var/lock/subsys/postgrey ]; then
55 msg_not_running postgrey
57 rm -f /var/lock/subsys/postgrey >/dev/null 2>&1
65 if [ -f /var/lock/subsys/postgrey ]; then
66 msg_reloading postgrey
67 killproc postgrey -HUP
70 msg_not_running postgrey
75 status --pidfile /var/run/postgrey.pid postgrey
79 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"