This commit is contained in:
Kroese 2023-04-20 15:27:06 +02:00 committed by GitHub
parent 4dc0791ffb
commit 328c3728b3

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eu
trap exit SIGINT SIGTERM
# Close any previous instances
script_name=${BASH_SOURCE[0]}
@ -11,8 +12,6 @@ for pid in $(pidof -x $script_name); do
fi
done
trap exit SIGINT SIGTERM
# Serve the page
HTML="<HTML><BODY><H1><CENTER>$2</CENTER></H1></BODY></HTML>"
RESPONSE="HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n$HTML\r\n"