Files
init.sh/modules/patch_snmp.sh
2021-09-08 15:47:39 +02:00

32 lines
1.0 KiB
Bash

# ------------------------------------------------------------------------------
# SNMP monitoring conf
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.
# The complete license agreement can be obtained at:
# https://opensource.org/licenses/BSD-3-Clause
# ------------------------------------------------------------------------------
export VER_patch_snmp="0.0.1"
patch_snmp()
{
backupdist /etc/snmp/snmpd.conf /etc/default/snmpd \
/lib/systemd/system/snmpd.service /etc/init.d/snmpd
installfile snmpd.conf /etc/snmp/snmpd.conf
installfile snmpd.init /etc/init.d/snmpd
[[ -e /lib/systemd/system/snmpd.service ]] &&
installfile snmpd.service /lib/systemd/system/snmpd.service &&
systemctl daemon-reload
svc_restart snmpd
}
precheck_patch_snmp()
{
:
}
export -f patch_snmp
export -f precheck_patch_snmp