mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Remove static key for openvpn
This commit is contained in:
parent
8e3a6ced89
commit
a7d41e1d6f
3 changed files with 23 additions and 60 deletions
|
@ -543,26 +543,6 @@ function wizard_add()
|
|||
ucic:save("ubond")
|
||||
ucic:commit("ubond")
|
||||
|
||||
-- Set OpenVPN settings
|
||||
local openvpn_key = luci.http.formvalue("openvpn_key")
|
||||
if openvpn_key ~= "" then
|
||||
local openvpn_key_path = "/etc/luci-uploads/openvpn.key"
|
||||
local fp
|
||||
luci.http.setfilehandler(
|
||||
function(meta, chunk, eof)
|
||||
if not fp and meta and meta.name == "openvpn_key" then
|
||||
fp = io.open(openvpn_key_path, "w")
|
||||
end
|
||||
if fp and chunk then
|
||||
fp:write(chunk)
|
||||
end
|
||||
if fp and eof then
|
||||
fp:close()
|
||||
end
|
||||
end)
|
||||
ucic:set("openvpn","omr","secret",openvpn_key_path)
|
||||
end
|
||||
|
||||
if default_vpn == "openvpn" then
|
||||
ucic:set("openvpn","omr","enabled",1)
|
||||
ucic:set("network","omrvpn","proto","dhcp")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue