Merge branch 'beta' of https://github.com/Heavybullets8/heavy_script into beta
This commit is contained in:
commit
d8bbd66845
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
sync(){
|
sync(){
|
||||||
echo_sync+=("\nSync Output")
|
echo_sync+=("\n\nSync Output")
|
||||||
echo_sync+=("-----------")
|
echo_sync+=("-----------")
|
||||||
cli -c 'app catalog sync_all' &> /dev/null && echo_sync+=("Catalog sync complete")
|
cli -c 'app catalog sync_all' &> /dev/null && echo_sync+=("Catalog sync complete")
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ done
|
|||||||
export -f sync
|
export -f sync
|
||||||
|
|
||||||
prune(){
|
prune(){
|
||||||
echo -e "\nDocker Prune Output"
|
echo -e "\n\nDocker Prune Output"
|
||||||
echo "-------------------"
|
echo "-------------------"
|
||||||
echo "Pruned Docker Images"
|
echo "Pruned Docker Images"
|
||||||
docker image prune -af | grep "^Total" || echo "Failed to Prune Docker Images"
|
docker image prune -af | grep "^Total" || echo "Failed to Prune Docker Images"
|
||||||
|
@ -39,7 +39,7 @@ if [[ $selection == "1" ]]; then
|
|||||||
exit
|
exit
|
||||||
elif [[ $selection == "2" ]]; then
|
elif [[ $selection == "2" ]]; then
|
||||||
mapfile -t unmount_array < <(basename -a /mnt/heavyscript/* | sed "s/*//")
|
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[@]}"
|
for i in "${unmount_array[@]}"
|
||||||
do
|
do
|
||||||
main=$(k3s kubectl get pvc -A | grep -E "\s$i\s" | awk '{print $1, $2, $4}')
|
main=$(k3s kubectl get pvc -A | grep -E "\s$i\s" | awk '{print $1, $2, $4}')
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
commander(){
|
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)
|
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 "------------------------"
|
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"
|
[[ -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"
|
[[ "$timeout" -le 120 ]] && echo "Warning: Your timeout is set low and may lead to premature rollbacks or skips"
|
||||||
echo "Asynchronous Updates: $update_limit"
|
echo "Asynchronous Updates: $update_limit"
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# shellcheck source=functions/backup.sh
|
||||||
source functions/backup.sh
|
source functions/backup.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user