1
0
Files
irix-657m-src/irix/cmd/snmp/hpagent/snmp.init
2022-09-29 17:59:04 +03:00

54 lines
901 B
Bash
Executable File

#! /bin/sh
#
# This script accompanies the snmp product. It starts the
# each of the SNMP extentions. The master snmpd which contains
# mib2 is started out of the network script for historical
# reasons.
#
# Running chkconfig snmpd off/on controls whether the child daemons
# are started.
#
# Options for agents should be put in these files.
# hpsnmpd.options flags for hpsnmpd
#
IS_ON=/sbin/chkconfig
if $IS_ON verbose ; then
ECHO=echo
else
ECHO=:
fi
CONFIG=/etc/config
BINDIR=/usr/etc
case "$1" in
'start')
$ECHO "SNMP Extended Agents:\c"
#
# hpsnmpd - handles the SGI port of the hp-ux mib.
#
if $IS_ON snmpd && test -x $BINDIR/hpsnmpd ; then
$BINDIR/hpsnmpd `cat $CONFIG/hpsnmpd.options 2>/dev/null`
$ECHO " hpsnmpd\c"
fi
$ECHO "."
;;
'stop')
#
# Kill all of the agents.
#
/sbin/killall hpsnmpd
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
exit 0