debug reload
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 1m9s

This commit is contained in:
jknapp 2025-03-09 11:56:18 -07:00
parent 9de12c72de
commit 8ae1a6b99f

View File

@ -154,7 +154,8 @@ def regenerate_conf():
@app.route('/api/reload', methods=['GET'])
def reload_haproxy():
if is_process_running('haproxy'):
subprocess.run(['echo', '"reload"', '|', 'socat', 'stdio', '/tmp/haproxy-cli'])
result = subprocess.run(['echo', '"reload"', '|', 'socat', 'stdio', '/tmp/haproxy-cli'],check=True,capture_output=True, text=True, shell=True)
print(f"result.stdout, result.stderr, result.returncode")
return jsonify({'status': 'success'}), 200
else:
try: