#!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /var/cvsroot/gentoo-x86/net-analyzer/ucd-snmp/files/snmpd.rc6,v 1.3 2002/05/04 03:16:38 woodchip Exp $ depend() { need net } checkconfig() { if [ ! -e /usr/share/snmp/snmpd.conf ] ; then eerror "You need an /usr/share/snmp/snmpd.conf to run ucd-snmpd" eerror "There is an example config in /usr/share/docs/ucd-snmp" return 1 fi } start() { checkconfig || return 1 ebegin "Starting snmpd" start-stop-daemon --start --quiet --exec /usr/sbin/snmpd eend $? } stop() { ebegin "Stopping snmpd" start-stop-daemon --stop --quiet --exec /usr/sbin/snmpd eend $? }