#!/bin/bash

set -eu

# We need to stop the snmpd server, oterhwise it will overwrite the
# persistent configuration file storing the credentials, and our update
# will have no effect.
ngcp-service stop snmpd

cat /etc/snmp/snmpd-creds.conf >>/var/lib/snmp/snmpd.conf

ngcp-service start snmpd
