Merge "Add handling of signal 15 in kill script"
This commit is contained in:
commit
f9bb21a80b
@ -40,9 +40,13 @@ kill_container() {
|
|||||||
$CLI rm $2
|
$CLI rm $2
|
||||||
}
|
}
|
||||||
|
|
||||||
hup_container() {
|
signal_container() {
|
||||||
add_date "Sending HUP signal to $1 ($2)"
|
SIGNAL=$3
|
||||||
$CLI kill --signal HUP $2
|
if [ -z "$SIGNAL" ]; then
|
||||||
|
SIGNAL="HUP"
|
||||||
|
fi
|
||||||
|
add_date "Sending signal '$SIGNAL' to $1 ($2)"
|
||||||
|
$CLI kill --signal $SIGNAL $2
|
||||||
}
|
}
|
||||||
|
|
||||||
{% raw -%}
|
{% raw -%}
|
||||||
@ -53,11 +57,14 @@ if [ -f /proc/$PID/cgroup ]; then
|
|||||||
|
|
||||||
case $SIG in
|
case $SIG in
|
||||||
HUP)
|
HUP)
|
||||||
hup_container $CT_NAME $CT_ID
|
signal_container $CT_NAME $CT_ID
|
||||||
;;
|
;;
|
||||||
9)
|
9)
|
||||||
kill_container $CT_NAME $CT_ID
|
kill_container $CT_NAME $CT_ID
|
||||||
;;
|
;;
|
||||||
|
15)
|
||||||
|
signal_container $CT_NAME $CT_ID 15
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
add_date "Unknown action ${SIG} for ${CT_NAME} ${CT_ID}"
|
add_date "Unknown action ${SIG} for ${CT_NAME} ${CT_ID}"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user