exit message on no pods
This commit is contained in:
parent
99ad0cd1fe
commit
08e9875978
@ -238,7 +238,7 @@ case $selection in
|
|||||||
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)
|
search=$(k3s crictl ps -a -s running)
|
||||||
mapfile -t pod_id < <(echo "$search" | grep -E " $app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $9}')
|
mapfile -t pod_id < <(echo "$search" | grep -E " $app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $9}')
|
||||||
|
[[ "${#pod_id[@]}" == 0 ]] && echo "Are you sure the application in running?" && exit
|
||||||
containers=$(
|
containers=$(
|
||||||
for pod in "${pod_id[@]}"
|
for pod in "${pod_id[@]}"
|
||||||
do
|
do
|
||||||
|
Loading…
Reference in New Issue
Block a user