blob: 0fd232d39f224d1383a81e4daa7b38423a3daf3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
#RCUPDATE:2 3 4:80:This line is required for script management
. /etc/rc.d/config/functions
SERVICE=snmpd
opts="start stop restart"
PIDFILE=/var/run/snmpd.pid
EXE=/usr/sbin/snmpd
start() {
ebegin "Starting $SERVICE..."
start-stop-daemon --start --quiet --exec $EXE
eend $? "Started $SERVICE." "Error Starting $SERVICE."
}
stop() {
ebegin "Stopping $SERVICE..."
start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $EXE
eend $? "Stopped $SERVICE." "Error Stopping $SERVICE."
}
restart() {
stop
start
}
doservice ${@}
|