mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
fix openvpn autorun issue
This commit is contained in:
parent
67d4bd2e64
commit
9c78b8dc3b
@ -10,7 +10,7 @@ LUCI_DEPENDS:=+openvpn-openssl +openvpn-easy-rsa
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_NAME:=luci-app-openvpn-server
|
||||
PKG_VERSION:=2.0
|
||||
PKG_RELEASE:=13
|
||||
PKG_RELEASE:=15
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -99,6 +99,7 @@ if pid == "" then
|
||||
function start.write(self, section)
|
||||
luci.util.exec("uci set openvpn.myvpn.enabled=='1' && uci commit openvpn")
|
||||
message = luci.util.exec("/etc/init.d/openvpn start 2>&1")
|
||||
luci.util.exec("/etc/init.d/openvpn enable")
|
||||
luci.util.exec("sleep 2")
|
||||
luci.http.redirect(
|
||||
luci.dispatcher.build_url("admin", "vpn", "openvpn-server") .. "?message=" .. message
|
||||
@ -110,6 +111,7 @@ else
|
||||
function stop.write(self, section)
|
||||
luci.util.exec("uci set openvpn.myvpn.enabled=='0' && uci commit openvpn")
|
||||
luci.util.exec("/etc/init.d/openvpn stop")
|
||||
luci.util.exec("/etc/init.d/openvpn disable")
|
||||
luci.util.exec("sleep 2")
|
||||
luci.http.redirect(
|
||||
luci.dispatcher.build_url("admin", "vpn", "openvpn-server")
|
||||
|
Loading…
Reference in New Issue
Block a user