From 132666935a396b3528e854bbc58eb8ff7b7d0381 Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Sun, 20 Oct 2019 20:59:59 +0200 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- pwnagotchi/plugins/default/auto-update.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pwnagotchi/plugins/default/auto-update.py b/pwnagotchi/plugins/default/auto-update.py index 2be968a3..68892773 100644 --- a/pwnagotchi/plugins/default/auto-update.py +++ b/pwnagotchi/plugins/default/auto-update.py @@ -114,19 +114,17 @@ def install(display, update): logging.warning("[update] can't find path for %s" % name) return False + logging.info("[update] stopping %s ..." % update['service']) os.system("service %s stop" % update['service']) os.system("mv %s %s" % (source_path, dest_path)) - + logging.info("[update] restarting %s ..." % update['service']) + os.system("service %s start" % update['service']) else: if not os.path.exists(source_path): source_path = "%s-%s" % (source_path, update['available']) - os.system("service %s stop" % update['service']) os.system("cd %s && pip3 install ." % source_path) - logging.info("[update] restarting %s ..." % update['service']) - os.system("service %s start" % update['service']) - return True