1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Restart all only if needed

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-11-27 20:10:50 +01:00
parent bc2951607a
commit 5c2607bd14

View file

@ -568,6 +568,7 @@ function wizard_add()
ucic:commit("openmptcprouter") ucic:commit("openmptcprouter")
-- Restart all -- Restart all
if gostatus == true then
luci.sys.call("(env -i /bin/ubus call network reload) >/dev/null 2>/dev/null") luci.sys.call("(env -i /bin/ubus call network reload) >/dev/null 2>/dev/null")
luci.sys.call("/etc/init.d/mptcp restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/mptcp restart >/dev/null 2>/dev/null")
if openmptcprouter_vps_key ~= "" then if openmptcprouter_vps_key ~= "" then
@ -584,7 +585,6 @@ function wizard_add()
luci.sys.call("/etc/init.d/omr-tracker restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/omr-tracker restart >/dev/null 2>/dev/null")
luci.sys.call("/etc/init.d/omr-6in4 restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/omr-6in4 restart >/dev/null 2>/dev/null")
luci.sys.call("/etc/init.d/vnstat restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/vnstat restart >/dev/null 2>/dev/null")
if gostatus == true then
luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/status")) luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/status"))
else else
luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/wizard")) luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/wizard"))