From feeb9059c43cf1e67b7eadde23bc5b0d7950e401 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Thu, 5 Apr 2018 12:23:29 +0200 Subject: [PATCH] Start glorytun-udp when refresh of config --- luci-app-glorytun/luasrc/model/cbi/glorytun.lua | 7 ++----- luci-app-glorytun/root/etc/uci-defaults/40_luci-glorytun | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/luci-app-glorytun/luasrc/model/cbi/glorytun.lua b/luci-app-glorytun/luasrc/model/cbi/glorytun.lua index 3364ee29b..8d6709d17 100644 --- a/luci-app-glorytun/luasrc/model/cbi/glorytun.lua +++ b/luci-app-glorytun/luasrc/model/cbi/glorytun.lua @@ -128,11 +128,8 @@ function updown.write(self, section, value) end else local type = proto.cfgvalue(self,section) - if type == 'udp' then - luci.sys.call("/etc/init.d/glorytun-udp start %s" % section) - else - luci.sys.call("/etc/init.d/glorytun start %s" % section) - end + luci.sys.call("/etc/init.d/glorytun-udp start %s" % section) + luci.sys.call("/etc/init.d/glorytun start %s" % section) end luci.http.redirect( self.redirect ) end diff --git a/luci-app-glorytun/root/etc/uci-defaults/40_luci-glorytun b/luci-app-glorytun/root/etc/uci-defaults/40_luci-glorytun index d4684cf85..d75431f4f 100644 --- a/luci-app-glorytun/root/etc/uci-defaults/40_luci-glorytun +++ b/luci-app-glorytun/root/etc/uci-defaults/40_luci-glorytun @@ -4,6 +4,7 @@ uci -q batch <<-EOF >/dev/null delete ucitrack.@glorytun[-1] add ucitrack glorytun set ucitrack.@glorytun[-1].init=glorytun + set ucitrack.@glorytun[-1].affects=glorytun-udp delete ucitrack.@glorytun-udp[-1] add ucitrack glorytun-udp set ucitrack.@glorytun-udp[-1].init=glorytun-udp