#!/bin/sh # # readlog This shell script takes care of starting and stopping # readlog. # # chkconfig: 2345 30 70 # description: readlog, part of smtp-poplock package # PIDFILE=/var/run/readlog.pid # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting readlog: " readlog & echo "done" ;; stop) # Stop daemons. echo -n "Shutting down readlog: " if [ -e $PIDFILE ]; then kill -TERM ` cat $PIDFILE ` fi echo "done" ;; restart) # Stop daemons. echo -n "Shutting down readlog: " if [ -e $PIDFILE ]; then kill -TERM ` cat $PIDFILE ` fi echo "done" # Start daemons. echo -n "Starting readlog: " readlog & echo "done" ;; *) echo "Usage: readlog {start|stop|restart}" exit 1 esac exit 0