Hotfix: Restart hysteria-server.service after updating config

file through API
This commit is contained in:
Iam54r1n4
2025-02-09 09:45:21 +00:00
parent cf43671315
commit 4fb27a466c

View File

@ -236,6 +236,7 @@ async def set_file(body: ConfigFile):
""" """
try: try:
cli_api.set_hysteria2_config_file(body.root) cli_api.set_hysteria2_config_file(body.root)
cli_api.restart_hysteria2()
return DetailResponse(detail='Hysteria2 configuration file updated successfully.') return DetailResponse(detail='Hysteria2 configuration file updated successfully.')
except Exception as e: except Exception as e:
raise HTTPException(status_code=400, detail=f'Error: {str(e)}') raise HTTPException(status_code=400, detail=f'Error: {str(e)}')