#!/bin/bash
#
#   Startup/shutdown script for webcleaner
#
#
# Start or stop webcleaner based upon the first argument to the script.
#

source /etc/init.d/smgl_functions

PROGRAM=/usr/bin/webcleaner
#ARGS="/etc/webcleaner/config"
RUNLEVEL=3
NEEDS="+network"

#. /etc/init.d/smgl_init


case $1 in
	start)
		echo "Starting webcleaner"
		loadproc $PROGRAM &
		evaluate_retval
		echo " "
		;;

 	stop)
                echo "Stopping webcleaner"
##		killproc $PROGRAM
		pkill -f $PROGRAM
		evaluate_retval
		echo " "
                ;;

        restart|reload)
                echo "Restarting webcleaner"
	        $0 stop
        	$0 start
		evaluate_retval
                ;;
        *)
                echo "Usage: $0 {start|stop|restart}"
                exit 1
		;;
esac
# end of procfile startup script
