From d835b2cae8abc71958b69362162e6a70c3d7ef63 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 08:48:59 +0200 Subject: Adding upstream version 4.6.0. Signed-off-by: Daniel Baumann --- scripts/check-uptime/fetch.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 scripts/check-uptime/fetch.py (limited to 'scripts/check-uptime/fetch.py') diff --git a/scripts/check-uptime/fetch.py b/scripts/check-uptime/fetch.py new file mode 100755 index 0000000..c1cceff --- /dev/null +++ b/scripts/check-uptime/fetch.py @@ -0,0 +1,7 @@ +#!/usr/bin/python3 +import crm_script +try: + uptime = open('/proc/uptime').read().split()[0] + crm_script.exit_ok(uptime) +except Exception as e: + crm_script.exit_fail("Couldn't open /proc/uptime: %s" % (e)) -- cgit v1.2.3