From a4b4408b3bbe81a8480b178971f84c1951c2d3df Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Wed, 27 Mar 2024 00:03:36 +0100 Subject: [PATCH] since_last_boot --- script.py | 4 ++-- templates/book.jinja | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script.py b/script.py index f64c3d9..75a2a81 100644 --- a/script.py +++ b/script.py @@ -113,8 +113,8 @@ output = template.render( ip_address = ip_address, logins_today = run_command(['grep', '-v', "Boot"], based=logins_today_log.stdout).splitlines(), list_active_services = run_command(["sudo", "service", "--status-all"]).splitlines(), - debian_version = run_command(["cat", "/etc/debian_version"]) if time_ago_arg else False, - hostname = run_command(["hostname","-i"]) if time_ago_arg else False, + debian_version = run_command(["cat", "/etc/debian_version"]) if not time_ago_arg else False, + hostname = run_command(["hostname","-i"]) if not time_ago_arg else False, groups_created = run_command(['grep', '-v', "Boot"], based=groupadd_today_log.stdout).splitlines(), groups_removed = run_command(['grep', '-v', "Boot"], based=groupremove_today_log.stdout).splitlines(), user_modified = run_command(['grep', '-v', "Boot"], based=usermod_today_log.stdout).splitlines(), diff --git a/templates/book.jinja b/templates/book.jinja index 8f8f726..bd93425 100644 --- a/templates/book.jinja +++ b/templates/book.jinja @@ -73,7 +73,7 @@ shelf bellow this e-reader. - {% if since_last_boot is defined %} + {% if since_last_boot %}

tldr@chopchop:~ $uptime -s

Uptime is the amount of time a server has been up, available, running, working, executing. This is time that is