mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-05 15:08:25 +00:00
Merge pull request #220 from DesobedienteTecnologico/0.5.0-ram
Restart and Poweroff working for SeedSignerOS
This commit is contained in:
@@ -188,10 +188,9 @@ class RestartView(View):
|
|||||||
# exiting.
|
# exiting.
|
||||||
time.sleep(0.25)
|
time.sleep(0.25)
|
||||||
|
|
||||||
# Kill the SeedSigner process; systemd will automatically restart it.
|
# Kill the SeedSigner process; Running the process again.
|
||||||
# `.*` is a wildcard to detect either `python`` or `python3` and with or
|
# `.*` is a wildcard to detect either `python`` or `python3`.
|
||||||
# without the `-u` flag.
|
call("kill $(pidof python*) & python /opt/src/main.py", shell=True)
|
||||||
call("kill $(ps aux | grep '[p]ython.*main.py' | awk '{print $2}')", shell=True)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -208,7 +207,7 @@ class PowerOffView(View):
|
|||||||
from subprocess import call
|
from subprocess import call
|
||||||
while self.keep_running:
|
while self.keep_running:
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
call("sudo shutdown --poweroff now", shell=True)
|
call("poweroff", shell=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -243,4 +242,4 @@ class UnhandledExceptionView(View):
|
|||||||
allow_text_overflow=True, # Fit what we can, let the rest go off the edges
|
allow_text_overflow=True, # Fit what we can, let the rest go off the edges
|
||||||
).display()
|
).display()
|
||||||
|
|
||||||
return Destination(MainMenuView, clear_history=True)
|
return Destination(MainMenuView, clear_history=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user