Merge branch '18-update-module' into 'master'
Resolve "Update Module" Closes #18 See merge request icaotix/linux-tools!13
This commit is contained in:
commit
ebbc22dc49
5
modules/systemupdate/__init__.py
Normal file
5
modules/systemupdate/__init__.py
Normal file
@ -0,0 +1,5 @@
|
||||
from .systemupdate import Systemupdate
|
||||
|
||||
|
||||
def get_module():
|
||||
return Systemupdate()
|
15
modules/systemupdate/systemupdate.py
Normal file
15
modules/systemupdate/systemupdate.py
Normal 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.")
|
Loading…
Reference in New Issue
Block a user