Uptime cleanup.
This commit is contained in:
parent
71d50ba6d0
commit
9c07d57684
1 changed files with 4 additions and 3 deletions
|
|
@ -11,12 +11,13 @@ local function shell_exec(command)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Execute shell commands
|
-- Execute shell commands
|
||||||
local uptime = shell_exec('uptime')
|
local uptime = shell_exec('uptime -p')
|
||||||
local version = shell_exec('uptime -V')
|
--local version = shell_exec('uptime -V')
|
||||||
|
|
||||||
-- Output the HTTP header
|
-- Output the HTTP header
|
||||||
io.write("Content-Type: text/plain; charset=utf-8\r\n\r\n")
|
io.write("Content-Type: text/plain; charset=utf-8\r\n\r\n")
|
||||||
|
|
||||||
-- Output the result
|
-- Output the result
|
||||||
io.write('Server ' .. version:sub(1, -2) .. ': ' .. uptime)
|
--io.write('Server ' .. version:sub(1, -2) .. ': ' .. uptime)
|
||||||
|
io.write('Server uptime: ' .. uptime)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue