mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-09 09:57:32 +08:00
Trap
This commit is contained in:
parent
19eb5e8927
commit
4dc0791ffb
@ -6,11 +6,13 @@ script_name=${BASH_SOURCE[0]}
|
|||||||
|
|
||||||
for pid in $(pidof -x $script_name); do
|
for pid in $(pidof -x $script_name); do
|
||||||
if [ $pid != $$ ]; then
|
if [ $pid != $$ ]; then
|
||||||
kill -9 $pid 2> /dev/null
|
kill -15 $pid 2> /dev/null
|
||||||
wait $pid 2> /dev/null
|
wait $pid 2> /dev/null
|
||||||
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