mirror of
https://github.com/AuxXxilium/arv-v-dsm.git
synced 2025-02-25 13:49:10 +07: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
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user