some fallbacks

main
vitrinekast 9 months ago
parent 2764beb097
commit b823b7bbc8

@ -112,12 +112,9 @@ output = template.render(
kitchen_services = kitchen_services,
ip_address = ip_address,
logins_today = run_command(['grep', '-v', "Boot"], based=logins_today_log.stdout).splitlines(),
list_groups = run_command(["getent","group"]).splitlines(),
list_active_services = run_command(["sudo", "service", "--status-all"]).splitlines(),
debian_version = run_command(["cat", "/etc/debian_version"]),
kernel_version = run_command(["uname","-a"]),
hostname = run_command(["hostname","-i"]),
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,
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(),

@ -64,22 +64,22 @@
<h1>The state of chopchop on {{now}}</h1>
<hr />
<p><em>tldr@chopchop:~ $</em>whoami</p>
<p>{{ device_info }}</p>
<p>{{ hostname }}</p>
<p>{{ ip_address }}</p>
<p>{{ device_info if device_info else '' }}</p>
<p>{{ hostname if hostname else '' }}</p>
<p>{{ ip_address if ip_address else '' }}</p>
<mark>
XPUB 1 users use chopchop as a shared community server.
chopchop is usually located in the Piet Zwart Wijnhaven building, although for this occassion it is resting on the
shelf bellow this e-reader.
</mark>
{% if since_last_boot is defined %}
<p><em>tldr@chopchop:~ $</em>uptime -s</p>
<mark>
Uptime is the amount of time a server has been up, available, running, working, executing. This is time that is
not spent idle, but time spent busy serving.
</mark>
<p>{{ since_last_boot }}</p>
{% if since_last_boot is defined %}
<mark>
{% if days_since_last_boot|int > 14 %}This is unusual, we are used to our server crashing quite often, especially
when we are all sharing the space and editing at the same time. Our server, chopchop, chops up time into small

Loading…
Cancel
Save