This commit is contained in:
Heavybullets8 2022-07-27 13:00:23 -06:00
commit d8bbd66845
4 changed files with 9 additions and 5 deletions

View File

@ -2,7 +2,7 @@
sync(){
echo_sync+=("\nSync Output")
echo_sync+=("\n\nSync Output")
echo_sync+=("-----------")
cli -c 'app catalog sync_all' &> /dev/null && echo_sync+=("Catalog sync complete")
@ -15,7 +15,7 @@ done
export -f sync
prune(){
echo -e "\nDocker Prune Output"
echo -e "\n\nDocker Prune Output"
echo "-------------------"
echo "Pruned Docker Images"
docker image prune -af | grep "^Total" || echo "Failed to Prune Docker Images"

View File

@ -39,7 +39,7 @@ if [[ $selection == "1" ]]; then
exit
elif [[ $selection == "2" ]]; then
mapfile -t unmount_array < <(basename -a /mnt/heavyscript/* | sed "s/*//")
[[ -z $unmount_array ]] && echo "Theres nothing to unmount" && exit
[[ -z ${unmount_array[*]} ]] && echo "Theres nothing to unmount" && exit
for i in "${unmount_array[@]}"
do
main=$(k3s kubectl get pvc -A | grep -E "\s$i\s" | awk '{print $1, $2, $4}')

View File

@ -3,9 +3,9 @@
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 -e "\nAplication Update Output"
echo -e "\n\nAplication Update Output"
echo "------------------------"
[[ -z $array ]] && echo "There are no updates available" && return 0 || echo "${#array[@]} update(s) available"
[[ -z ${array[*]} ]] && echo "There are no updates available" && return 0 || echo "${#array[@]} update(s) available"
[[ -z $timeout ]] && echo "Default Timeout: 500" && timeout=500 || echo "Custom Timeout: $timeout"
[[ "$timeout" -le 120 ]] && echo "Warning: Your timeout is set low and may lead to premature rollbacks or skips"
echo "Asynchronous Updates: $update_limit"

View File

@ -1,5 +1,9 @@
#!/bin/bash
# cd to script, this ensures the script can find the source scripts below, even when ran from a seperate directory
script=$(readlink -f "$0")
script_path=$(dirname "$script")
cd "$script_path" || exit
# shellcheck source=functions/backup.sh
source functions/backup.sh