mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-19 07:05:58 -04:00
fix
This commit is contained in:
parent
faa639c031
commit
a47fb1f234
19
src/invidious/helpers/uptime.cr
Normal file
19
src/invidious/helpers/uptime.cr
Normal file
@ -0,0 +1,19 @@
|
||||
class Invidious::Uptime
|
||||
|
||||
def self.get_uptime
|
||||
|
||||
str_uptime = "error"
|
||||
|
||||
# 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
|
||||
|
||||
return str_uptime
|
||||
|
||||
end
|
||||
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user