Uptime cleanup.

This commit is contained in:
Johannes Findeisen 2024-04-05 22:44:39 +02:00
commit 9c07d57684

View file

@ -11,12 +11,13 @@ local function shell_exec(command)
end
-- Execute shell commands
local uptime = shell_exec('uptime')
local version = shell_exec('uptime -V')
local uptime = shell_exec('uptime -p')
--local version = shell_exec('uptime -V')
-- Output the HTTP header
io.write("Content-Type: text/plain; charset=utf-8\r\n\r\n")
-- Output the result
io.write('Server ' .. version:sub(1, -2) .. ': ' .. uptime)
--io.write('Server ' .. version:sub(1, -2) .. ': ' .. uptime)
io.write('Server uptime: ' .. uptime)