mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-18 09:46:58 +00:00
fix: lede luci apply not work
This commit is contained in:
parent
101e42fd6c
commit
4ef9eb40cf
@ -100,7 +100,7 @@ func process(client net.Conn) {
|
|||||||
logrus.Debug("Connect timeout: ", err)
|
logrus.Debug("Connect timeout: ", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logrus.Error("Connect failed: ", err)
|
logrus.Warn("Connect failed: ", err)
|
||||||
client.Close()
|
client.Close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,9 +18,9 @@ status.rawhtml = true
|
|||||||
status.cfgvalue = function(self, section)
|
status.cfgvalue = function(self, section)
|
||||||
local pid = luci.sys.exec("pidof ua3f")
|
local pid = luci.sys.exec("pidof ua3f")
|
||||||
if pid == "" then
|
if pid == "" then
|
||||||
return "<span style='color:red'>" .. translate("Stopped") .. "</span>"
|
return "<span style='color:red'>" .. "Stopped" .. "</span>"
|
||||||
else
|
else
|
||||||
return "<span style='color:green'>" .. translate("Running") .. "</span>"
|
return "<span style='color:green'>" .. "Running" .. "</span>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -49,4 +49,9 @@ log.cfgvalue = function(self, section)
|
|||||||
end
|
end
|
||||||
log.rows = 30
|
log.rows = 30
|
||||||
|
|
||||||
|
local apply = luci.http.formvalue("cbi.apply")
|
||||||
|
if apply then
|
||||||
|
io.popen("/etc/init.d/ua3f.service restart")
|
||||||
|
end
|
||||||
|
|
||||||
return ua3f
|
return ua3f
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user