Browse Source

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>
lilik-openwrt-22.03
Alin Nastac 6 years ago
committed by Alin Nastac
parent
commit
2168930089
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      net/net-snmp/files/snmpd.init

+ 3
- 1
net/net-snmp/files/snmpd.init View File

@ -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
}

Loading…
Cancel
Save