linux-tools/modules/systemupdate/systemupdate.py

16 lines
499 B
Python
Raw Normal View History

2020-03-05 19:40:04 +01:00
import subprocess
from AbstractModule import AbstractModule
class Systemupdate(AbstractModule):
def run(self):
print("Running update")
2020-03-05 19:56:54 +01:00
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"])
2020-03-05 19:40:04 +01:00
print("All update processes finished, please check output for further details.")