urlfilter: start urlfilter only if globally enabled

This commit is contained in:
Sukru Senli 2021-04-27 09:50:48 +02:00
parent 8d6d7626b8
commit e650d27f76
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
config globals globals
option enable 1

View file

@ -20,7 +20,7 @@ configure_firewall()
}
start_service() {
if [ -f "/etc/config/urlfilter" ]; then
if [ "$(uci -q get urlfilter.globals.enable)" == "1" ]; then
procd_open_instance urlfilter
procd_set_param command ${PROG}
configure_firewall