linux-tools/modules/systemupdate/Systemupdate.py

14 lines
440 B
Python
Raw Normal View History

2020-03-05 19:40:04 +01:00
import subprocess
class Systemupdate:
2020-03-05 19:40:04 +01:00
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.")