Fsniper file to be put in /etc/init.d

export HOME=/root

case "$1" in
start)
echo -n "Starting Fsniper: "
/usr/local/bin/fsniper --daemon
echo -e "... [ \e[00;32mOK\e[00m ]"
;;
stop)
echo -n "Shutdown Fsniper: "
kill -9 `ps aux | grep "fsniper --daemon" | grep -v grep | awk {'print $2'}`
echo -e "... [ \e[00;32mOK\e[00m ]"
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart"
exit 1
esac

exit 0





#################  for full configuration see http://pc2solution.blogspot.in/2012/11/installing-configuring-fsniper-advanced.html

Comments