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
|
||||
}
|
||||
|
||||
hup_container() {
|
||||
add_date "Sending HUP signal to $1 ($2)"
|
||||
$CLI kill --signal HUP $2
|
||||
signal_container() {
|
||||
SIGNAL=$3
|
||||
if [ -z "$SIGNAL" ]; then
|
||||
SIGNAL="HUP"
|
||||
fi
|
||||
add_date "Sending signal '$SIGNAL' to $1 ($2)"
|
||||
$CLI kill --signal $SIGNAL $2
|
||||
}
|
||||
|
||||
{% raw -%}
|
||||
@ -53,11 +57,14 @@ if [ -f /proc/$PID/cgroup ]; then
|
||||
|
||||
case $SIG in
|
||||
HUP)
|
||||
hup_container $CT_NAME $CT_ID
|
||||
signal_container $CT_NAME $CT_ID
|
||||
;;
|
||||
9)
|
||||
kill_container $CT_NAME $CT_ID
|
||||
;;
|
||||
15)
|
||||
signal_container $CT_NAME $CT_ID 15
|
||||
;;
|
||||
*)
|
||||
add_date "Unknown action ${SIG} for ${CT_NAME} ${CT_ID}"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user