Merge branch '18-update-module' into 'master'

Resolve "Update Module"

Closes #18

See merge request icaotix/linux-tools!13
This commit is contained in:
Marcel Schwarz 2020-03-05 19:11:33 +00:00
commit ebbc22dc49
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.call(["apt", "update", "-y"])
subprocess.call(["apt", "upgrade", "-y"])
subprocess.call(["apt", "dist-upgrade", "-y"])
subprocess.call(["apt", "autoremove", "-y"])
subprocess.call(["apt", "autoclean", "-y"])
print("All update processes finished, please check output for further details.")