|
|
|
@ -91,12 +91,12 @@ journal_today = subprocess.run(["sudo", "journalctl","_COMM=systemd-logind","_CO
|
|
|
|
|
kitchen_services = run_command(["sudo", "journalctl", "-u", "kitchen-stove.service", "-u", "kitchen-bin.service", "-u", "kitchen-fridge.service", "-r", "-n"] + get_journalctl_on()).splitlines()
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
groups_created = subprocess.run(['grep','groupadd'], capture_output=True, input=journal_today.stdout)..stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
groups_removed = subprocess.run(['grep','groupremove'], capture_output=True, input=journal_today.stdout)..stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
users_created_today = subprocess.run(['grep','useradd'], capture_output=True, input=journal_today.stdout)..stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
user_modified = subprocess.run(['grep','usermod'], capture_output=True, input=journal_today.stdout)..stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
user_deleted = subprocess.run(['grep','userdel'], capture_output=True, input=journal_today.stdout)..stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
logins_today = subprocess.run(['grep','New session'], capture_output=True, input=journal_today.stdout)..stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
groups_created = subprocess.run(['grep','groupadd'], capture_output=True, input=journal_today.stdout).stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
groups_removed = subprocess.run(['grep','groupremove'], capture_output=True, input=journal_today.stdout).stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
users_created_today = subprocess.run(['grep','useradd'], capture_output=True, input=journal_today.stdout).stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
user_modified = subprocess.run(['grep','usermod'], capture_output=True, input=journal_today.stdout).stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
user_deleted = subprocess.run(['grep','userdel'], capture_output=True, input=journal_today.stdout).stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
logins_today = subprocess.run(['grep','New session'], capture_output=True, input=journal_today.stdout).stdout.decode('UTF-8').strip().splitlines()
|
|
|
|
|
|
|
|
|
|
except subprocess.CalledProcessError as e:
|
|
|
|
|
raise RuntimeError("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))
|
|
|
|
|