/[gentoo-x86]/net-analyzer/net-snmp/files/snmpd.init.2
Gentoo

Contents of /net-analyzer/net-snmp/files/snmpd.init.2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Oct 22 02:57:05 2012 UTC (6 months, 3 weeks ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -2 lines
Remove need net line.

(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)

1 #!/sbin/runscript
2 # Copyright 1999-2012 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.init.2,v 1.2 2012/08/21 15:45:47 flameeyes Exp $
5
6 SNMPD_PIDFILE="${SNMPD_PIDFILE:-/var/run/snmpd.pid}"
7
8 extra_started_commands="reload"
9
10 command="/usr/sbin/snmpd"
11 command_args="-p ${SNMPD_PIDFILE} ${SNMPD_FLAGS}"
12 pidfile="${SNMPD_PIDFILE}"
13
14 depend() {
15 use logger
16 }
17
18 checkconfig() {
19 if [ ! -e /etc/snmp/snmpd.conf ] ; then
20 eerror "${SVCNAME} requires an /etc/snmp/snmpd.conf configuration file"
21 return 1
22 fi
23 }
24
25 start_pre() {
26 checkconfig || return 1
27 }
28
29 reload() {
30 checkconfig || return 1
31
32 ebegin "Reloading ${SVCNAME} configuration"
33 kill -HUP $(cat ${SNMPD_PIDFILE}) 2>&1 > /dev/null
34 eend $?
35 }

  ViewVC Help
Powered by ViewVC 1.1.13