linamh/net-analyzer/net-snmp/files/snmptrapd.init

25 lines
624 B
Plaintext
Raw Normal View History

#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmptrapd.init,v 1.1 2009/10/16 08:51:05 gengor Exp $
depend() {
use logger
need net
}
SNMPTRAPD_PIDFILE="${SNMPTRAPD_PIDFILE:-/var/run/snmptrapd.pid}"
start() {
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --quiet --exec /usr/sbin/snmptrapd \
-- -p ${SNMPTRAPD_PIDFILE} ${SNMPTRAPD_FLAGS}
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --quiet --pidfile ${SNMPTRAPD_PIDFILE}
eend $?
}