This commit is contained in:
Kroese 2023-04-20 15:26:22 +02:00 committed by GitHub
parent 19eb5e8927
commit 4dc0791ffb

View File

@ -6,11 +6,13 @@ script_name=${BASH_SOURCE[0]}
for pid in $(pidof -x $script_name); do
if [ $pid != $$ ]; then
kill -9 $pid 2> /dev/null
kill -15 $pid 2> /dev/null
wait $pid 2> /dev/null
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"