fix: lede luci apply not work

This commit is contained in:
SunBK201 2024-03-22 16:43:10 +08:00
parent 101e42fd6c
commit 4ef9eb40cf
2 changed files with 8 additions and 3 deletions

View File

@ -100,7 +100,7 @@ func process(client net.Conn) {
logrus.Debug("Connect timeout: ", err)
return
}
logrus.Error("Connect failed: ", err)
logrus.Warn("Connect failed: ", err)
client.Close()
return
}

View File

@ -18,9 +18,9 @@ status.rawhtml = true
status.cfgvalue = function(self, section)
local pid = luci.sys.exec("pidof ua3f")
if pid == "" then
return "<span style='color:red'>" .. translate("Stopped") .. "</span>"
return "<span style='color:red'>" .. "Stopped" .. "</span>"
else
return "<span style='color:green'>" .. translate("Running") .. "</span>"
return "<span style='color:green'>" .. "Running" .. "</span>"
end
end
@ -49,4 +49,9 @@ log.cfgvalue = function(self, section)
end
log.rows = 30
local apply = luci.http.formvalue("cbi.apply")
if apply then
io.popen("/etc/init.d/ua3f.service restart")
end
return ua3f