Merge pull request #67 from catspeed-cc/dev-uptime-status

Update uptime.cr
This commit is contained in:
MooCat 2024-10-22 00:04:56 -04:00 committed by GitHub
commit 392d71ce3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,10 +7,7 @@ class Invidious::Uptime
if CONFIG.uptime_enabled
# get the uptime
uptime_cmd = "/usr/bin/uptime"
uptime_args = "-p"
process = Process.new(uptime_cmd, [uptime_args], output: Process::Redirect::Pipe)
str_uptime = process.output.gets_to_end
str_uptime = `/usr/bin/uptime -p`
else
str_uptime = ""
@ -20,4 +17,4 @@ class Invidious::Uptime
end
end
end