1
0
Fork 0
mirror of https://github.com/iv-org/invidious.git synced 2025-07-29 09:38:40 -04:00
This commit is contained in:
mooleshacat 2024-10-20 12:29:38 -04:00
parent faa639c031
commit a47fb1f234

View 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