#!/bin/sh
#Update script for snmp config.
#This script will update the snmpd.conf from /usr/local/afribin/configs to the respective /etc/snmp and /usr/local/etc/snmp directory
#Script by Jan Prinsloo 17/07/2006
#Afrihost.com - The Best Web Hosting Ever

OS=`uname -s`
export OS

case "$OS" in
   FreeBSD)
      echo "Stopping Snmpd"
      /usr/local/etc/rc.d/snmpd.sh stop
      echo "Copying Config"
      cp /usr/local/afribin/configs/snmpd.conf /usr/local/etc/snmp/snmpd.conf
      echo "Starting Snmpd"
      /usr/local/etc/rc.d/snmpd.sh start

   ;;
   Linux)
      echo "Stopping Snmpd"
      service snmpd stop
      echo "Copying Config"
      cp /usr/local/afribin/configs/snmpd.conf /etc/snmp/snmpd.conf
      echo "Starting Snmpd"
      service snmpd start
   

;;
esac



