#!/bin/bash

. ${TOOLKIT}-functions.sh

# initialize kusa defines temp db
#
:> $MODLOCALDB
echo "[temp]" >>$MODLOCALDB


# agent listen on all interfaces?
#
agent_address=$(jtconf srv-snmp.agent_address)

case $agent_address in
  LOCAL)
	echo "  snmpd: listen to local interfaces only"
	echo '  agent_address	udp:127.0.0.1:161' >>$MODLOCALDB
	;;
  ALL)
	echo "  snmpd: listen to ALL interfaces"
	echo '  agent_address	udp:161,udp6:[::1]:161' >>$MODLOCALDB
	;;
  *)
	echo '  agent_address	$agent_address' >>$MODLOCALDB
	;;
esac

exit 0
