mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Empty pass in wizard remove it
This commit is contained in:
parent
cccf917c16
commit
1d5fbd422d
1 changed files with 16 additions and 0 deletions
|
@ -87,6 +87,11 @@ function wizard_add()
|
|||
ucic:set("shadowsocks-libev","sss0","disabled",0)
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:commit("shadowsocks-libev")
|
||||
else
|
||||
ucic:set("shadowsocks-libev","sss0","key","")
|
||||
ucic:set("shadowsocks-libev","sss0","disabled",1)
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:commit("shadowsocks-libev")
|
||||
end
|
||||
|
||||
-- Set Glorytun TCP settings
|
||||
|
@ -100,6 +105,12 @@ function wizard_add()
|
|||
ucic:set("glorytun","vpn","proto","tcp")
|
||||
ucic:save("glorytun")
|
||||
ucic:commit("glorytun")
|
||||
else
|
||||
ucic:set("glorytun","vpn","key","")
|
||||
ucic:set("glorytun","vpn","enable",0)
|
||||
ucic:set("glorytun","vpn","proto","tcp")
|
||||
ucic:save("glorytun")
|
||||
ucic:commit("glorytun")
|
||||
end
|
||||
|
||||
-- Set MLVPN settings
|
||||
|
@ -115,6 +126,11 @@ function wizard_add()
|
|||
ucic:set("mlvpn","general","interface_name","mlvpn0")
|
||||
ucic:save("mlvpn")
|
||||
ucic:commit("mlvpn")
|
||||
else
|
||||
ucic:set("mlvpn","general","enable",0)
|
||||
ucic:set("mlvpn","general","password","")
|
||||
ucic:save("mlvpn")
|
||||
ucic:commit("mlvpn")
|
||||
end
|
||||
|
||||
luci.sys.call("(env -i /bin/ubus call network reload) >/dev/null 2>/dev/null")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue