ºá¤Èȳ++ÆóΧÇØÈ¿

#! /bin/bash

# snort start script
# chkconfig:35 90 90
# description:snort is IDS system

# Source function library.
. /etc/init.d/functions

#program name
snort=/usr/local/bin/snort
prog=snort
RETVAL=0

start() {
	echo -n $"Starting $prog:"
	daemon $snort -c /etc/snort/snort.conf -u snort -g snort -Dde -l /var/log/snort/
	RETVAL=$?
	echo
	return $RETVAL
}
stop() {
	echo -n "Stopping $prog:"
	killproc $snort
	RETVAL=$?
	echo
	return $RETVAL
}
restart() {
	stop
	start
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart)
		restart
		;;
	*)
		echo $"Usage:$prog {start|stop|restart}"
		exit
esac
exit $?

¥È¥Ã¥×   ÊÔ½¸ Åà·ë º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ñ¸ì¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS
Last-modified: 2012-06-08 (¶â) 00:25:05 (2694d)