#! /bin/sh # # This is the smokeping /etc/init.d script. Modified to run with # smokeping by Jose Carlos Garcia Sogo . # # Written by Miquel van Smoorenburg . # Modified for Debian GNU/Linux # by Ian Murdock . # # Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl # PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/root/postgrey-1.12/postgrey NAME=postgrey DESC=postgrey PIDFILE="/var/run/$NAME.pid" DOPTIONS="--inet=10023 -d" OPTIONS="" test -f $DAEMON || exit 0 set -e case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile $PIDFILE \ --name $NAME --startas $DAEMON -- $OPTIONS $DOPTIONS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --oknodo --stop --quiet --name $NAME --signal 15 rm -f $PIDFILE echo "$NAME." ;; # restart|force-reload) # echo -n "Restarting $DESC: " # start-stop-daemon --start --quiet --pidfile \ # $PIDFFILE --exec $DAEMON -- $OPTIONS $DOPTIONS --restart # echo "$NAME." # ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop}" >&2 # echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0