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

Add option to enable/disable vnstat backup

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-07-22 17:47:48 +02:00
parent e06a8c4fcf
commit d4b0cd82e6
3 changed files with 32 additions and 6 deletions

View file

@ -554,6 +554,11 @@ function settings_add()
ucic:set("openmptcprouter","settings","external_check",externalcheck)
ucic:commit("openmptcprouter")
-- Enable/disable external check
local savevnstat = luci.http.formvalue("savevnstat") or "0"
luci.sys.exec("uci -q set vnstat.@vnstat[0].backup=%s" % savevnstat)
ucic:commit("openmptcprouter")
-- Enable/disable fast open
local fastopen = luci.http.formvalue("disablefastopen") or "0"
ucic:foreach("shadowsocks-libev", "ss_redir", function (section)