#! /bin/sh set -e . /usr/share/debconf/confmodule db_version 2.0 if [ "x$1" = xconfigure ]; then if [ ! `getent group snmp >/dev/null` ]; then deluser --quiet --system snmp fi adduser --quiet --system --group --no-create-home --home /var/lib/snmp snmp chown -R snmp:snmp /var/lib/snmp fi # Remove shutdown and reboot links; this init script does not need them. if [ "x$2" = x5.4.2.1~dfsg-3ubuntu2 ]; then rm -f /etc/rc0.d/K20snmpd /etc/rc6.d/K20snmpd fi # Automatically added by dh_installinit if [ -x "/etc/init.d/snmpd" ]; then update-rc.d snmpd start 20 2 3 4 5 . stop 20 1 . >/dev/null invoke-rc.d snmpd start || exit $? fi # End automatically added section # Automatically added by dh_pycentral rm -f /var/lib/pycentral/snmpd.pkgremove if which pycentral >/dev/null 2>&1; then pycentral pkginstall snmpd if grep -qs '^snmpd$' /var/lib/pycentral/delayed-pkgs; then sed -i '/^snmpd$/d' /var/lib/pycentral/delayed-pkgs fi fi # End automatically added section exit 0