fix the package install script

main
vitrinekast 8 months ago
parent 7fc7150cac
commit f838a40ff2

@ -44,10 +44,11 @@ time_since_last_boot = now - slb_date
dpkg_date = now.strftime("%Y-%m-%d")
list_package_installs = subprocess.run(["grep","-E", '${dpkg_date}.*install|install.*${dpkg_date}', "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines()
list_package_upgrade = subprocess.run(["grep","-E", '${dpkg_date}.*upgrade|upgrade.*${dpkg_date}', "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines()
list_package_remove = subprocess.run(["grep","-E", '${dpkg_date}.*remove|remove.*${dpkg_date}', "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines()
list_package_installs = subprocess.run(["grep","-E", dpkg_date + '.*install|install.*' + dpkg_date, "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines()
list_package_upgrade = subprocess.run(["grep","-E", dpkg_date + '.*upgrade|upgrade.*' + dpkg_date, "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines()
list_package_remove = subprocess.run(["grep","-E", dpkg_date + '.*remove|remove.*' + dpkg_date, "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines()
device_info_grab = subprocess.run(["grep", 'Model' , "/proc/cpuinfo"], check=True, capture_output=True)
device_info = run_command(['awk', '-F:', '{ print $2}'], based=device_info_grab.stdout)

@ -70,16 +70,19 @@
{% endif %}
<pre><em>tldr@chopchop:~ $</em>sudo journalctl -S today _COMM=useradd -r</pre>
<mark>
<mark>
Users are assigned to groups, which allow them rights to read or edit files, run commands or apply infrastructural changes. For chopchop, we all have 'sudo rights': the ability to perform any command, including the more sensitive ones. Sudo is a command that's short for 'superuser do', with it, a user has more privileges, like installing or updating a package or performing a restart.
</mark>
</mark>
{% if users_created_today is defined %}
<mark>
{% if users_created_today|length > 0 %}{{last_user_name}} user was added, and the network of trust grew ever so slightly. Users will be trusted with not just the keys and passwords to the "house" which is the server, but with a
portion of responsibility to keep it afloat and contribute to what makes it a community of practices (and
network of knowledge and dependence).{% else %}No new users were created today. The trust network remains the same size.{% endif %}
{% if users_created_today|length > 0 %}
{{last_user_name}} user was added, and the network of trust grew ever so slightly. Users will be trusted with not just the keys and passwords to the "house" which is the server, but with a portion of responsibility to keep it afloat and contribute to what makes it a community of practices (and network of knowledge and dependence).
{% else
No new users were created today. The trust network remains the same size.
{% endif %}
</mark>
{% endif %}
{% endif %}
{% if list_package_installs|length > 0 %}
<pre><em>tldr@chopchop:~ $</em> grep 'install' /var/log/dpkg.log</pre>

Loading…
Cancel
Save