Merge pull request #220 from DesobedienteTecnologico/0.5.0-ram

Restart and Poweroff working for SeedSignerOS
This commit is contained in:
Nick Klockenga
2022-06-13 22:42:35 -04:00
committed by GitHub
+4 -5
View File
@@ -188,10 +188,9 @@ class RestartView(View):
# exiting.
time.sleep(0.25)
# Kill the SeedSigner process; systemd will automatically restart it.
# `.*` is a wildcard to detect either `python`` or `python3` and with or
# without the `-u` flag.
call("kill $(ps aux | grep '[p]ython.*main.py' | awk '{print $2}')", shell=True)
# Kill the SeedSigner process; Running the process again.
# `.*` is a wildcard to detect either `python`` or `python3`.
call("kill $(pidof python*) & python /opt/src/main.py", shell=True)
@@ -208,7 +207,7 @@ class PowerOffView(View):
from subprocess import call
while self.keep_running:
time.sleep(5)
call("sudo shutdown --poweroff now", shell=True)
call("poweroff", shell=True)