added file dependency check, switched back to english, smaller fix and improvements
This commit is contained in:
@@ -13,20 +13,27 @@ export DEP_patch_snmp="install_pkg"
|
||||
|
||||
patch_snmp()
|
||||
{
|
||||
pkginst snmpd
|
||||
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
|
||||
installfile snmpd/snmpd.conf /etc/snmp/snmpd.conf
|
||||
installfile snmpd/snmpd.init /etc/init.d/snmpd
|
||||
installfile snmpd/snmpd.default /etc/default/snmpd
|
||||
if [[ -e /lib/systemd/system/snmpd.service ]]; then
|
||||
installfile snmpd.service /lib/systemd/system/snmpd.service
|
||||
systemctl daemon-reload
|
||||
installfile snmpd/snmpd.service /lib/systemd/system/snmpd.service
|
||||
if command -v systemctl &> /dev/null; then
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
fi
|
||||
svc_restart snmpd
|
||||
}
|
||||
|
||||
precheck_patch_snmp()
|
||||
{
|
||||
:
|
||||
file_exists snmpd/snmpd.{conf,init,default}
|
||||
if [[ -e /lib/systemd/system/snmpd.service ]]; then
|
||||
file_exists snmpd/snmpd.service
|
||||
fi
|
||||
}
|
||||
|
||||
export -f patch_snmp
|
||||
|
||||
Reference in New Issue
Block a user