Implement systemupdate module

This commit is contained in:
Marcel Schwarz 2020-03-05 19:40:04 +01:00
parent 8b0c9c689c
commit de73914477
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,5 @@
from .systemupdate import Systemupdate
def get_module():
return Systemupdate()

View File

@ -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.")