IPCEICIS-2952 #31

Merged
Michal.Wrobel merged 113 commits from IPCEICIS-2952 into development 2025-05-28 10:30:56 +00:00
Showing only changes of commit 40d1d025a6 - Show all commits

View file

@ -11,9 +11,20 @@ data:
start.sh: |
#!/bin/sh
echo "Starting mini HTTP server on port 8080..."
while true; do
# Wait for HTTP POST and respond
{ echo -ne "HTTP/1.1 200 OK\r\nContent-Length: 26\r\n\r\nSIGHUP sent to OpenBAO"; \
/tmp/sidecar.sh; } | nc -l -p 8080 -q 1
echo "Waiting for HTTP POST..."
REQUEST=$(nc -l -p 8080)
echo "$REQUEST" | grep -q "POST /" && {
echo "Received POST request, sending SIGHUP..."
/tmp/sidecar.sh
RESPONSE="HTTP/1.1 200 OK\r\nContent-Length: 26\r\n\r\nSIGHUP sent to OpenBAO"
} || {
RESPONSE="HTTP/1.1 405 Method Not Allowed\r\nContent-Length: 18\r\n\r\nMethod Not Allowed"
}
echo -e "$RESPONSE" | nc -N localhost 8081
done