mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
Trap
This commit is contained in:
parent
4dc0791ffb
commit
328c3728b3
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
trap exit SIGINT SIGTERM
|
||||||
|
|
||||||
# Close any previous instances
|
# Close any previous instances
|
||||||
script_name=${BASH_SOURCE[0]}
|
script_name=${BASH_SOURCE[0]}
|
||||||
@ -11,8 +12,6 @@ for pid in $(pidof -x $script_name); do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
trap exit SIGINT SIGTERM
|
|
||||||
|
|
||||||
# Serve the page
|
# Serve the page
|
||||||
HTML="<HTML><BODY><H1><CENTER>$2</CENTER></H1></BODY></HTML>"
|
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"
|
RESPONSE="HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n$HTML\r\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user