diff --git a/modules/systemupdate/__init__.py b/modules/systemupdate/__init__.py new file mode 100644 index 0000000..15f905e --- /dev/null +++ b/modules/systemupdate/__init__.py @@ -0,0 +1,5 @@ +from .systemupdate import Systemupdate + + +def get_module(): + return Systemupdate() diff --git a/modules/systemupdate/systemupdate.py b/modules/systemupdate/systemupdate.py new file mode 100644 index 0000000..d0b78f8 --- /dev/null +++ b/modules/systemupdate/systemupdate.py @@ -0,0 +1,15 @@ +import subprocess + +from AbstractModule import AbstractModule + + +class Systemupdate(AbstractModule): + + def run(self): + print("Running update") + subprocess.run("apt update") + subprocess.run("apt upgrade") + subprocess.run("apt dist-upgrade") + subprocess.run("apt autoremove") + subprocess.run("apt autoclean") + print("All update processes finished, please check output for further details.")