Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
c5cddd8b
Commit
c5cddd8b
authored
Dec 10, 2014
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/snmpd: add start/stop support to snmpd init script
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
858a598a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
S80snmp
userspace/rootfs_override/etc/init.d/S80snmp
+35
-2
No files found.
userspace/rootfs_override/etc/init.d/S80snmp
View file @
c5cddd8b
#!/bin/sh
# Log to syslog at daemon level. Amd log source address (-a)
snmpd
-Lsd
-p
/var/run/snmpd.pid
-a
-c
/wr/etc/snmpd.conf
SNMP_PID
=
/var/run/snmpd.pid
SNMP_CONF
=
/wr/etc/snmpd.conf
start
()
{
# Log to syslog at daemon level. And log source address (-a)
snmpd
-Lsd
-p
$SNMP_PID
-a
-c
$SNMP_CONF
}
stop
()
{
if
pidof snmpd
>
/dev/null
;
then
echo
-n
"Stopping snmpd: "
start-stop-daemon
-K
-q
-p
$SNMP_PID
echo
"OK"
fi
}
restart
()
{
stop
start
}
case
"
$1
"
in
start
)
start
;;
stop
)
stop
;;
restart|reload
)
restart
;;
*
)
echo
$"Usage:
$0
{start|stop|restart}"
exit
1
;;
esac
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment