main
vitrinekast 9 months ago
parent 7fa28f0bc2
commit a650c08058

@ -60,6 +60,7 @@ if not time_ago_arg:
device_info = run_command(['awk', '-F:', '{ print $2}'], based=device_info_grab.stdout)
ip_address_show = subprocess.run(["ip", "addr", "show", "end0"], check=True, capture_output=True)
ip_address = run_command(['awk', '$1 == "inet" {gsub(/\/.*$/, "", $2); print $2}' ], based=ip_address_show.stdout)
list_active_services = run_command(["sudo", "service", "--status-all"]).splitlines()
else:
since_last_boot = False
device_info = False
@ -120,7 +121,7 @@ output = template.render(
days_since_last_boot = time_since_last_boot,
kitchen_services = kitchen_services,
ip_address = ip_address,
list_active_services = run_command(["sudo", "service", "--status-all"]).splitlines() if not time_ago_arg else False,
list_active_services = list_active_services,
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 = groups_created,

Loading…
Cancel
Save