linux-tools/modules/systemupdate/__init__.py

19 lines
455 B
Python
Raw Normal View History

import subprocess
2020-08-02 13:58:47 +02:00
from print_helpers import print_gr
def run():
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"])
2020-08-02 13:58:47 +02:00
print_gr("All update processes finished, please check output for further details.")
functions = {
"run": run
}