vpnbypass: add procd reload trigger for vpnbypass config
authorRichard Yu <yurichard3839@gmail.com>
Mon, 9 Dec 2019 12:25:50 +0000 (20:25 +0800)
committerRichard Yu <yurichard3839@gmail.com>
Tue, 10 Dec 2019 13:52:42 +0000 (21:52 +0800)
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
net/vpnbypass/Makefile
net/vpnbypass/files/vpnbypass.init

index 84973c15c5656ac5ec45dc99f6e9e54dfe3ea2d2..4b67e86aa02c75b7a9434eaf0bc2f4d3b502317b 100644 (file)
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vpnbypass
 PKG_VERSION:=1.3.1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
 
@@ -59,16 +59,6 @@ define Package/vpnbypass/postinst
        # check if we are on real system
        if [ -z "$${IPKG_INSTROOT}" ]; then
                /etc/init.d/vpnbypass enable
-
-               while uci -q del ucitrack.@vpnbypass[-1]; do :; done
-
-               uci -q batch <<-EOF >/dev/null
-                       add ucitrack vpnbypass
-                       set ucitrack.@vpnbypass[0].init='vpnbypass'
-                       del_list ucitrack.@firewall[0].affects='vpnbypass'
-                       add_list ucitrack.@firewall[0].affects='vpnbypass'
-                       commit ucitrack
-       EOF
        fi
        exit 0
 endef
@@ -77,8 +67,6 @@ define Package/vpnbypass/prerm
        #!/bin/sh
        # check if we are on real system
        if [ -z "$${IPKG_INSTROOT}" ]; then
-               while uci -q delete ucitrack.@vpnbypass[-1]; do :; done
-               uci -q del_list ucitrack.@firewall[0].affects='vpnbypass'
                echo "Stopping service and removing rc.d symlink for vpnbypass"
                /etc/init.d/vpnbypass stop || true
                /etc/init.d/vpnbypass disable || true
index 756b36d728c9829b50e36adf03d9f440ca563710..7ff785f897ee2f3158ae8d86a54e23a09db1388e 100644 (file)
@@ -115,8 +115,7 @@ service_triggers_load_interface() { is_supported_interface "$1" && ifaces="${ifa
 service_triggers() {
                local ifaces n
                config_load network; config_foreach service_triggers_load_interface 'interface';
-               procd_add_reload_trigger 'firewall'
-               procd_add_reload_trigger 'openvpn'
+               procd_add_reload_trigger 'firewall' 'openvpn' 'vpnbypass'
                procd_open_trigger
                        for n in $ifaces; do procd_add_reload_interface_trigger "$n"; procd_add_interface_trigger "interface.*" "$n" /etc/init.d/vpnbypass reload; done;
                        output "$serviceName monitoring interfaces: $ifaces $_OK_\\n"