Merge "Fix kill-script search string to match any "/libpod-""
This commit is contained in:
commit
f4d1d830a7
@ -48,7 +48,7 @@ delete_container() {
|
|||||||
{% raw -%}
|
{% raw -%}
|
||||||
if [ -f /proc/$PID/cgroup ]; then
|
if [ -f /proc/$PID/cgroup ]; then
|
||||||
# Get container ID based on process cgroups
|
# Get container ID based on process cgroups
|
||||||
CT_ID=$(awk 'BEGIN {FS=".scope|-"} /0::|:pids:/ {if ($(NF-1)) print $(NF-1);exit}' /proc/$PID/cgroup)
|
CT_ID=$(awk 'BEGIN {FS=".scope|-"} /\/libpod-/ {if ($(NF-1)) print $(NF-1);exit}' /proc/$PID/cgroup)
|
||||||
CT_NAME=$($CLI inspect -f '{{.Name}}' $CT_ID)
|
CT_NAME=$($CLI inspect -f '{{.Name}}' $CT_ID)
|
||||||
|
|
||||||
case $SIG in
|
case $SIG in
|
||||||
|
Loading…
Reference in New Issue
Block a user