mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-18 06:35:49 -04:00
Update uptime.cr
Shorten the code 👍
This commit is contained in:
parent
d4834dcb3e
commit
0ca21d0b3f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user