incase days are added
This commit is contained in:
parent
0852e29d8a
commit
074b3d09cf
@ -23,7 +23,7 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
app_name=$(echo -e "$app_name" | grep ^"$selection)" | awk '{print $2}')
|
app_name=$(echo -e "$app_name" | grep ^"$selection)" | awk '{print $2}')
|
||||||
search=$(k3s crictl ps -a -s running | sed -E 's/([0-9]*|About)[[:space:]](an|hours)[[:space:]](hour)?[[:space:]]?ago//')
|
search=$(k3s crictl ps -a -s running | sed -E 's/([0-9]*|About)[[:space:]][a-z]{2,5}[[:space:]](hour)?[[:space:]]?ago//')
|
||||||
mapfile -t pod_id < <(echo "$search" | grep -E "[[:space:]]$app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $(NF)}')
|
mapfile -t pod_id < <(echo "$search" | grep -E "[[:space:]]$app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $(NF)}')
|
||||||
[[ "${#pod_id[@]}" == 0 ]] && echo -e "No containers available\nAre you sure the application in running?" && exit
|
[[ "${#pod_id[@]}" == 0 ]] && echo -e "No containers available\nAre you sure the application in running?" && exit
|
||||||
containers=$(
|
containers=$(
|
||||||
|
Loading…
Reference in New Issue
Block a user