|
|
|
@ -61,10 +61,10 @@ logins_today_log = subprocess.run(["sudo", "journalctl","_COMM=systemd-logind",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: merge into one command and then grep the various _COMM\s, wrap in a function
|
|
|
|
|
groupadd_today_log = subprocess.run(["sudo", "journalctl","_COMM=groupadd","-r"], check=True, capture_output=True)
|
|
|
|
|
groupremove_today_log = subprocess.run(["sudo", "journalctl","_COMM=groupremove","-r"], check=True, capture_output=True)
|
|
|
|
|
usermod_today_log = subprocess.run(["sudo", "journalctl","_COMM=usermod","-r"], check=True, capture_output=True)
|
|
|
|
|
userdel_today_log = subprocess.run(["sudo", "journalctl","_COMM=userdel","-r"], check=True, capture_output=True)
|
|
|
|
|
groupadd_today_log = subprocess.run(["sudo", "journalctl", "-S","today","_COMM=groupadd","-r"], check=True, capture_output=True)
|
|
|
|
|
groupremove_today_log = subprocess.run(["sudo", "journalctl", "-S","today","_COMM=groupremove","-r"], check=True, capture_output=True)
|
|
|
|
|
usermod_today_log = subprocess.run(["sudo", "journalctl", "-S","today","_COMM=usermod","-r"], check=True, capture_output=True)
|
|
|
|
|
userdel_today_log = subprocess.run(["sudo", "journalctl", "-S","today","_COMM=userdel","-r"], check=True, capture_output=True)
|
|
|
|
|
|
|
|
|
|
kitchen_services = run_command(["sudo", "journalctl", "-S", "today", "-u", "kitchen-stove.service", "-u", "kitchen-bin.service", "-u", "kitchen-fridge.service", "-r", "-n"]).splitlines()
|
|
|
|
|
|
|
|
|
@ -80,14 +80,11 @@ output = template.render(
|
|
|
|
|
now = now.strftime("%B %dth %Y"),
|
|
|
|
|
last_user_added=last_user_added.stdout.decode('UTF-8'),
|
|
|
|
|
last_user_added_name=last_user_added_name,
|
|
|
|
|
# users_created_today=users_created_today,
|
|
|
|
|
users_created_today=fallback,
|
|
|
|
|
users_created_today=users_created_today,
|
|
|
|
|
since_last_boot=since_last_boot,
|
|
|
|
|
list_package_installs=[],
|
|
|
|
|
# list_package_upgrade=list_package_upgrade,
|
|
|
|
|
list_package_upgrade=[],
|
|
|
|
|
# list_package_remove=list_package_remove,
|
|
|
|
|
list_package_remove=[],
|
|
|
|
|
list_package_installs=list_package_installs,
|
|
|
|
|
list_package_upgrade=list_package_upgrade,
|
|
|
|
|
list_package_remove=list_package_remove,
|
|
|
|
|
device_info=device_info,
|
|
|
|
|
days_since_last_boot = time_since_last_boot.days,
|
|
|
|
|
kitchen_services = kitchen_services,
|
|
|
|
|