mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 06:58:39 +01:00
net-snmp: reload firewall only when needed
Firewall needs to be reloaded in the following cases: - on service start when snmpd.general.enabled=1 - when snmpd daemon is stopped Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
This commit is contained in:
@@ -337,7 +337,8 @@ start_service() {
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
[ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE"
|
||||
[ -f "$CONFIGFILE" ] || return
|
||||
rm -f "$CONFIGFILE"
|
||||
procd_set_config_changed firewall
|
||||
}
|
||||
|
||||
@@ -353,5 +354,6 @@ service_triggers(){
|
||||
}
|
||||
|
||||
service_started() {
|
||||
[ "$snmp_enabled" -eq 0 ] && return
|
||||
procd_set_config_changed firewall
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user