Implement systemupdate module
This commit is contained in:
parent
8b0c9c689c
commit
de73914477
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.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.")
|
Loading…
Reference in New Issue
Block a user