mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-06-13 23:42:04 +08:00
fix openvpn startup
This commit is contained in:
parent
0b15c6ed16
commit
42e25a6b08
@ -10,7 +10,7 @@ LUCI_DEPENDS:=+openvpn-openssl +openvpn-easy-rsa
|
|||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
PKG_NAME:=luci-app-openvpn-server
|
PKG_NAME:=luci-app-openvpn-server
|
||||||
PKG_VERSION:=2.0
|
PKG_VERSION:=2.0
|
||||||
PKG_RELEASE:=15
|
PKG_RELEASE:=16
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
@ -99,7 +99,6 @@ if pid == "" then
|
|||||||
function start.write(self, section)
|
function start.write(self, section)
|
||||||
luci.util.exec("uci set openvpn.myvpn.enabled=='1' && uci commit openvpn")
|
luci.util.exec("uci set openvpn.myvpn.enabled=='1' && uci commit openvpn")
|
||||||
message = luci.util.exec("/etc/init.d/openvpn start 2>&1")
|
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.util.exec("sleep 2")
|
||||||
luci.http.redirect(
|
luci.http.redirect(
|
||||||
luci.dispatcher.build_url("admin", "vpn", "openvpn-server") .. "?message=" .. message
|
luci.dispatcher.build_url("admin", "vpn", "openvpn-server") .. "?message=" .. message
|
||||||
@ -111,7 +110,6 @@ else
|
|||||||
function stop.write(self, section)
|
function stop.write(self, section)
|
||||||
luci.util.exec("uci set openvpn.myvpn.enabled=='0' && uci commit openvpn")
|
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 stop")
|
||||||
luci.util.exec("/etc/init.d/openvpn disable")
|
|
||||||
luci.util.exec("sleep 2")
|
luci.util.exec("sleep 2")
|
||||||
luci.http.redirect(
|
luci.http.redirect(
|
||||||
luci.dispatcher.build_url("admin", "vpn", "openvpn-server")
|
luci.dispatcher.build_url("admin", "vpn", "openvpn-server")
|
||||||
|
@ -39,7 +39,8 @@ uci set firewall.@forwarding[-1].dest="lan"
|
|||||||
uci commit firewall;
|
uci commit firewall;
|
||||||
/etc/init.d/firewall restart
|
/etc/init.d/firewall restart
|
||||||
|
|
||||||
/etc/init.d/openvpn disable && /etc/init.d/openvpn stop
|
/etc/init.d/openvpn enable
|
||||||
|
/etc/init.d/openvpn stop
|
||||||
|
|
||||||
rm -f /tmp/luci-indexcache
|
rm -f /tmp/luci-indexcache
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user