fix: resolved permission issue by adjusting subprocess call to explicitly use Python
This commit is contained in:
@ -34,9 +34,7 @@ def update_port(port):
|
|||||||
with open(CONFIG_FILE, 'w') as f:
|
with open(CONFIG_FILE, 'w') as f:
|
||||||
json.dump(config, f, indent=2)
|
json.dump(config, f, indent=2)
|
||||||
|
|
||||||
subprocess.run([CLI_PATH, "restart-hysteria2"],
|
subprocess.run(["python3", CLI_PATH, "restart-hysteria2"],)
|
||||||
stdout=subprocess.DEVNULL,
|
|
||||||
stderr=subprocess.DEVNULL)
|
|
||||||
|
|
||||||
print(f"Port changed successfully to {port}.")
|
print(f"Port changed successfully to {port}.")
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user