From 85eb4a17a1771c10466941f79b412e9a24cb9ecc Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Tue, 26 Jul 2022 17:53:08 -0600 Subject: [PATCH] Titles --- functions/backup.sh | 4 +++- functions/menu.sh | 1 + functions/misc.sh | 7 ++++++- functions/update_apps.sh | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/functions/backup.sh b/functions/backup.sh index a4eff30b..f2221932 100644 --- a/functions/backup.sh +++ b/functions/backup.sh @@ -2,7 +2,9 @@ backup(){ -echo_backup+=("\nNumber of backups was set to $number_of_backups") +echo_backup+=("\nBackup Output") +echo_backup+=("--------------") +echo_backup+=("Number of backups was set to $number_of_backups") date=$(date '+%Y_%m_%d_%H_%M_%S') [[ "$verbose" == "true" ]] && cli -c 'app kubernetes backup_chart_releases backup_name=''"'HeavyScript_"$date"'"' &> /dev/null && echo_backup+=(HeavyScript_"$date") [[ -z "$verbose" ]] && echo_backup+=("\nNew Backup Name:") && cli -c 'app kubernetes backup_chart_releases backup_name=''"'HeavyScript_"$date"'"' | tail -n 1 &> /dev/null && echo_backup+=(HeavyScript_"$date") diff --git a/functions/menu.sh b/functions/menu.sh index acb24d7c..440c3f29 100644 --- a/functions/menu.sh +++ b/functions/menu.sh @@ -130,6 +130,7 @@ menu(){ if [[ $current_selection == 0 ]]; then clear -x echo "Running \"bash heavy_script.sh ${update_selection[*]}\"" + echo exec bash "$script_name" "${update_selection[@]}" exit elif [[ $current_selection == 1 ]]; then diff --git a/functions/misc.sh b/functions/misc.sh index e6439e9f..96ca57e1 100644 --- a/functions/misc.sh +++ b/functions/misc.sh @@ -2,6 +2,8 @@ sync(){ +echo_sync+=("\nSync Output") +echo_sync+=("-----------") cli -c 'app catalog sync_all' &> /dev/null && echo_sync+=("Catalog sync complete") #Dump the echo_array, ensures all output is in a neat order. @@ -13,7 +15,10 @@ done export -f sync prune(){ -echo -e "\nPruning Docker Images" && docker image prune -af | grep "^Total" || echo "Failed to Prune Docker Images" +echo -e "\nDocker Prune Output" +echo "-------------------" +echo "Pruned Docker Images" +docker image prune -af | grep "^Total" || echo "Failed to Prune Docker Images" } export -f prune diff --git a/functions/update_apps.sh b/functions/update_apps.sh index 4664de1b..f036f3f9 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -3,6 +3,8 @@ commander(){ mapfile -t array < <(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,container_images_update_available,status' | tr -d " \t\r" | grep -E ",true($|,)" | sort) +echo "Aplication Update Output" +echo "------------------------" [[ -z $array ]] && echo -e "\nThere are no updates available" && return 0 || echo -e "\n${#array[@]} update(s) available" [[ -z $timeout ]] && echo -e "\nDefault Timeout: 500" && timeout=500 || echo -e "\nCustom Timeout: $timeout" [[ "$timeout" -le 120 ]] && echo "Warning: Your timeout is set low and may lead to premature rollbacks or skips"