#!/sbin/runscript # bogofilter-milter.pl This shell script takes care of starting and # stopping bogofilter-milter.pl. # # description: bogofilter-milter.pl integrates bogofilter into sendmail. # processname: bogofilter-milter.pl # pidfile: /var/run/bogofilter-milter.pid # # This script is known to work on Gentoo systems. To use it to run # bogofilter-milter on startup, save it as # /etc/init.d/bogofilter-milter, make sure it's executable, and # run "rc-update add bogofilter-milter default". See rc-update docs for # more info such as adding it to a different run level. To use it to # launch the bogofilter-milter daemon immediately, run # "/etc/init.d/bogofilter-milter start" # If you change where bogofilter-milter.pl is saved or where the PID and # sock files are located, modify the paths below accordingly. # This script is by Tom Anderson . depend() { need net use logger } start() { ebegin "Starting bogofilter-milter" if [ -f /var/run/bogofilter-milter.pid ]; then rm -f /var/run/bogofilter-milter.pid fi if [ -S /var/run/bogofilter-milter.sock ]; then rm -f /var/run/bogofilter-milter.sock fi start-stop-daemon --start --quiet --pidfile /var/run/bogofilter-milter.pid --exec /usr/sbin/bogofilter-milter.pl -- --daemon eend $? "Failed to start bogofilter-milter" } stop() { ebegin "Stopping bogofilter-milter" start-stop-daemon --stop --quiet --pidfile /var/run/bogofilter-milter.pid eend $? "Failed to stop bogofilter-milter" }