提交 42e25a6b 编写于 作者: C coolsnowwolf

fix openvpn startup

上级 0b15c6ed
......@@ -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:=15
PKG_RELEASE:=16
include $(TOPDIR)/feeds/luci/luci.mk
......
......@@ -99,7 +99,6 @@ 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
......@@ -111,7 +110,6 @@ 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")
......
......@@ -39,7 +39,8 @@ uci set firewall.@forwarding[-1].dest="lan"
uci commit firewall;
/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
exit 0
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册