[Greylist-users] Startscript for /etc/init.d/ fpo SuSE 9
Jean-Pierre Bergamin
james at ractive.ch
Sun Aug 15 11:58:43 PDT 2004
Hello Guido
> i am searchig for a startscript for SuSE 9 /etc/init.d/.
I'm using the script below for the postgrey implementation of David
Schweikert at http://isg.ee.ethz.ch/tools/postgrey/
Copy the script to /etc/init.d/postgrey and make a symlink to it in
/usr/sbin
# ln -s /etc/init.d/postgrey /usr/sbin/rcpostgrey
After that you can activate the service with the runlevel editor in yast.
Regards
James
#! /bin/sh
#
# Author: james at p800.info, based on template from source package
#
# /etc/init.d/postgrey
# and its symbolic link
# /usr/sbin/rcpostgrey
#
### BEGIN INIT INFO
# Provides: postgrey
# Required-Start: $postfix
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Description: postgrey - greylisting implementation
### END INIT INFO
. /etc/rc.status
# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
EXE=/usr/bin/postgrey
NAME=postgrey
# Force execution if not called by a runlevel directory.
test -x $EXE || exit 0
case "$1" in
start)
echo -n "Starting $NAME "
startproc $EXE -d --user=postfix
--unix=/var/spool/postfix/private/policy
rc_status -v
;;
stop)
echo -n "Shutting down $NAME "
killproc -TERM $EXE
rc_status -v
;;
restart)
$0 stop
$0 start
rc_status
;;
try-restart)
$0 status
if test $? = 0; then
$0 restart
else
rc_reset
fi
rc_status
;;
force-reload)
$0 stop; sleep 1 && $0 start
rc_status
;;
reload)
echo -n "Reload service $NAME "
killproc -HUP $EXE
rc_status -v
;;
status)
echo -n "Checking for $NAME "
checkproc $EXE
rc_status -v
;;
*)
echo "Usage: $0
{start|stop|try-restart|restart|force-reload|reload|status}"
exit 1
esac
rc_exit
More information about the Greylist-users
mailing list