From a8b9deac6a2c725f9c24293b1f579a3a984ddc39 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Tue, 10 May 2022 12:48:35 -0600 Subject: [PATCH] cleaner timemout message --- heavy_script.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/heavy_script.sh b/heavy_script.sh index 1d5bd7ba..b80ca5b8 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -116,7 +116,7 @@ if [[ $selection == "1" ]]; then pvc=$(echo -e "$list" | grep ^"$selection" || echo -e "\nInvalid selection") status=$(cli -m csv -c 'app chart_release query name,status' | grep -E "(,|^)$app(,|$)" | awk -F ',' '{print $2}'| tr -d " \t\n\r") if [[ "$status" != "STOPPED" ]]; then - [[ -z $timeout ]] && echo -e "\nDefault Timeout: 500" && timeout=500 || echo -e "\nTimeout was set to $timeout" + [[ -z $timeout ]] && echo -e "\nDefault Timeout: 500" && timeout=500 || echo -e "\nCustom Timeout: $timeout" SECONDS=0 && echo -e "\nScaling down $app" && midclt call chart.release.scale "$app" '{"replica_count": 0}' &> /dev/null else echo -e "\n$app is already stopped" @@ -163,7 +163,7 @@ export -f prune update_apps(){ mapfile -t array < <(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,container_images_update_available,status' | grep ",true" | sort) [[ -z $array ]] && echo -e "\nThere are no updates available" || echo -e "\n${#array[@]} update(s) available" - [[ -z $timeout ]] && echo -e "\nSetting Default Timeout to 500\nChange timeout with -t" && timeout=500 || echo -e "\nTimeout was set to $timeout" + [[ -z $timeout ]] && echo -e "\nDefault Timeout: 500" && timeout=500 || echo -e "\nCustom Timeout: $timeout" for i in "${array[@]}" do app_name=$(echo "$i" | awk -F ',' '{print $1}') #print out first catagory, name.