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 /usr/sbin/postgrey -d --pidfile=/var/run/postgrey.pid $OPTIONS
45 if [ $RETVAL -eq 0 ]; then
47 touch /var/lock/subsys/postgrey
52 msg_already_running postgrey
56 if [ -f /var/lock/subsys/postgrey ]; then
60 msg_not_running postgrey
62 rm -f /var/lock/subsys/postgrey >/dev/null 2>&1
70 if [ -f /var/lock/subsys/postgrey ]; then
71 msg_reloading postgrey
72 killproc postgrey -HUP
75 msg_not_running postgrey
80 status --pidfile /var/run/postgrey.pid postgrey
84 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"