misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
74a75f03b8
commit
132666935a
@ -114,19 +114,17 @@ def install(display, update):
|
|||||||
logging.warning("[update] can't find path for %s" % name)
|
logging.warning("[update] can't find path for %s" % name)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
logging.info("[update] stopping %s ..." % update['service'])
|
||||||
os.system("service %s stop" % update['service'])
|
os.system("service %s stop" % update['service'])
|
||||||
os.system("mv %s %s" % (source_path, dest_path))
|
os.system("mv %s %s" % (source_path, dest_path))
|
||||||
|
logging.info("[update] restarting %s ..." % update['service'])
|
||||||
|
os.system("service %s start" % update['service'])
|
||||||
else:
|
else:
|
||||||
if not os.path.exists(source_path):
|
if not os.path.exists(source_path):
|
||||||
source_path = "%s-%s" % (source_path, update['available'])
|
source_path = "%s-%s" % (source_path, update['available'])
|
||||||
|
|
||||||
os.system("service %s stop" % update['service'])
|
|
||||||
os.system("cd %s && pip3 install ." % source_path)
|
os.system("cd %s && pip3 install ." % source_path)
|
||||||
|
|
||||||
logging.info("[update] restarting %s ..." % update['service'])
|
|
||||||
os.system("service %s start" % update['service'])
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user