|
|
|
@ -3,10 +3,6 @@ from jinja2 import Environment, FileSystemLoader
|
|
|
|
|
## Getting the data
|
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
|
# last_user_added = subprocess.run(["sudo", "journalctl","_COMM=useradd","-r","-n","1","--output-fields=MESSAGE"], capture_output=True).stdout.decode('UTF-8')
|
|
|
|
|
# users_created_today = subprocess.run(["sudo", "journalctl","_COMM=useradd","-r","-n","1","--output-fields=MESSAGE", "-S","yesterday"], capture_output=True).stdout.decode('UTF-8')
|
|
|
|
|
# list_active_services = subprocess.run(["sudo", "journalctl","_COMM=useradd","-r","-n","1","--output-fields=MESSAGE", "-S","yesterday"], capture_output=True).stdout.decode('UTF-8')
|
|
|
|
|
|
|
|
|
|
last_user_added = subprocess.run(["sudo", "journalctl","_COMM=useradd","-r","-n", "1" , "--output-fields=MESSAGE"], capture_output=True).stdout.decode('UTF-8')
|
|
|
|
|
users_created_today = subprocess.run(["sudo", "journalctl", "-S","today","_COMM=useradd","-r","-n","1","--output-fields=MESSAGE"], capture_output=True).stdout.decode('UTF-8')
|
|
|
|
|
list_active_services = subprocess.run(["sudo", "service", "--status-all"], capture_output=True).stdout.decode('UTF-8')
|
|
|
|
|