popfile script update..

Posted on March 5, 2005

small bugfix:

/opt/popfile/popfile.sh
#!/sbin/sh

. /lib/svc/share/smf_include.sh

POPFILE_ROOT=/opt/popfile
POPFILE_USER=$POPFILE_ROOT
POPFILE=$POPFILE_ROOT/popfile.pl
PID=`pgrep popfile.pl`

CONF_FILE=$POPFILE_ROOT/popfile.cfg
LOGDIR=/var/log/popfile

[ ! -f ${CONF_FILE} ] && exit $SMF_EXIT_ERR_CONFIG

case “$1″ in
’start’)
if [ “${PID}” = “” ] ; then
cd ${POPFILE_ROOT}
${POPFILE} –set config_piddir=/var/run/ –set logger_logdir=$LOGDIR/ &
echo “Starting POPFile as background process: done”
else
echo “Starting POPFile as background process: POPFile already running”
fi
;;
’stop’)
if [ “${PID}” = “” ] ; then
echo “Stopping POPFile: POPFile not running”
else
kill $PID
PID=”"
echo “Stopping POPFile: done”
fi
exit $SMF_EXIT_OK
;;
*)
echo “Usage: $0 { start | stop }”
exit 1
;;
esac

Filed Under Uncategorized |

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name

Email

Website

Comments

For spam detection purposes, please copy the number 5524 to the field below:

© Copyright 0xDEADBEEFCAFE • Powered by Wordpress • Design by Sebastin.

free web hit counter