File "guardian.sh"

Full path: /www/wwwroot/fabriciovc.eti.br/downloads/scripts/ZeNiX_2014-01-11/debian/documentacao/guardian/guardian.sh
File size: 633 B
MIME-type: text/x-shellscript
Charset: utf-8

Download   Open   Back

#!/bin/bash

start()
{
	export PATH=$PATH:/usr/local/bin
	/usr/local/bin/guardian.pl -c /etc/snort/guardian.conf
}

stop()
{
	ps aux | grep 'guardian.pl *-c' 2>&1 > /dev/null
	if [ $? -eq 0 ];
	then
		kill `ps aux | grep 'guardian.pl *-c' | awk '{print $2}'`
	else
		echo "Guardian is not running ....."
	fi
}

status()
{
	ps aux | grep 'guardian.pl *-c' 2>&1 > /dev/null
	if [ $? -eq 0 ];
	then
		echo "Guardian is Running ....."
	else
		echo "Guardian is not Running ...."
	fi
}

case "$1" in
	start)
	start
	;;
	stop)
	stop
	;;
	restart)
	stop
	start
	;;
	status)
	status;;
	*)
	echo $"Usage: $0 {start|stop|restart|status}"
esac

PHP File Manager