MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /etc/rc3.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //etc/rc3.d/K50snmptrapd
#!/bin/bash

# ucd-snmp init file for snmptrapd
#
# chkconfig: - 50 50
# description: Simple Network Management Protocol (SNMP) Trap Daemon
#
# processname: /usr/sbin/snmptrapd
# config: /etc/snmp/snmptrapd.conf
# config: /usr/share/snmp/snmptrapd.conf
# pidfile: /var/run/snmptrapd.pid
# 
# source function library
. /etc/init.d/functions

[ -e /etc/snmp/snmptrapd.options ] && . /etc/snmp/snmptrapd.options

OPTIONS="-Lsd -p /var/run/snmptrapd.pid"
RETVAL=0
prog="snmptrapd"

start() {
	echo -n $"Starting $prog: "
        daemon /usr/sbin/snmptrapd $OPTIONS
	RETVAL=$?
	echo
	touch /var/lock/subsys/snmptrapd
	return $RETVAL
}

stop() {
	echo -n $"Stopping $prog: "
	killproc /usr/sbin/snmptrapd
	RETVAL=$?
	echo
	rm -f /var/lock/subsys/snmptrapd
	return $RETVAL
}

reload(){
	stop
	start
}

restart(){
	stop
	start
}

condrestart(){
    [ -e /var/lock/subsys/snmptrapd ] && restart
    return 0
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart)
	restart
        ;;
  reload)
	reload
        ;;
  condrestart)
	condrestart
	;;
  status)
        status snmptrapd
	RETVAL=$?
        ;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
	RETVAL=1
esac

exit $RETVAL

Anon7 - 2021