mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-14 08:58:17 +01:00
Minor cleanup relating to app restart code
This commit is contained in:
@@ -173,12 +173,7 @@ def config_watch():
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
def signal_handler(signum, frame):
|
def signal_handler(signum, frame):
|
||||||
# Handle the signal (e.g., SIGHUP) for triggering a restart
|
|
||||||
print(f"Received signal {signum}. Initiating restart...")
|
print(f"Received signal {signum}. Initiating restart...")
|
||||||
restart_program()
|
|
||||||
|
|
||||||
def restart_program():
|
|
||||||
print("Restarting the program...")
|
|
||||||
python = sys.executable
|
python = sys.executable
|
||||||
os.execl(python, python, *sys.argv)
|
os.execl(python, python, *sys.argv)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user