Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
snmptt
> snmptrapd.init-suse
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File snmptrapd.init-suse of Package snmptt (Revision 5)
Currently displaying revision
5
,
show latest
#!/bin/sh # # Autor: Ciro Iriarte <ciriarte@personal.com.py> # # /etc/init.d/snmptrapd # # y el link simbolico # # /usr/sbin/rcsnmptrapd # ### BEGIN INIT INFO # Provides: snmptrapd # Required-Start: $remote_fs $syslog $network snmpd # Required-Stop: $remote_fs $syslog # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: snmptrapd, para recibir traps ### END INIT INFO . /etc/rc.status OPTIONS="-On -Lf /var/log/snmptrapd.log" BINARY="/usr/sbin/snmptrapd" prog="snmptrapd" test -x $BINARY || exit 5 case "$1" in start) echo -n "Starting $prog: " startproc $BINARY $OPTIONS rc_status -v ;; stop) echo -n "Stopping $prog: " killproc -TERM $BINARY rm -f /var/lock/subsys/snmptrapd rc_status -v ;; restart) $0 stop $0 start rc_status ;; reload) echo -n "Reload service $prog " killproc -HUP $BINARY rc_status -v ;; try-restart) ## Do a restart only if the service was active before. ## Note: try-restart is now part of LSB (as of 1.9). ## RH has a similar command named condrestart. $0 status if test $? = 0; then $0 restart else rc_reset # Not running is not a failure. fi # Remember status and be quiet rc_status ;; status) echo -n "Checking for $prog " checkproc $BINARY rc_status -v ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|reload}" exit 1 ;; esac rc_exit