Merge pull request #288 from truecharts/shellfixes

Fix heavybugs
This commit is contained in:
Kjeld Schouten-Lebbing 2022-12-27 16:28:08 +01:00 committed by GitHub
commit f16444eb91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View File

@ -98,6 +98,7 @@ do
read -rt 120 -p "Delete more backups? (y/N): " yesno || { echo -e "\nFailed to make a selection in time" ; exit; }
case $yesno in
[Yy] | [Yy][Ee][Ss])
deleteBackup
break
;;
[Nn] | [Nn][Oo])

10
includes/backup.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
## Simple shortcut to just list the backups without promts and such
listBackups(){
echo -e "${BWhite}Backup Listing Tool${Color_Off}"
clear -x && echo "pulling all restore points.."
list_backups=$(cli -c 'app kubernetes list_backups' | grep -v system-update | sort -t '_' -Vr -k2,7 | tr -d " \t\r" | awk -F '|' '{print $2}' | nl | column -t)
[[ -z "$list_backups" ]] && echo -e "${IRed}No restore points available${Color_Off}" && exit || echo "Detected Backups:" && echo "$list_backups"
}
export -f listBackups

View File

@ -24,6 +24,8 @@ source includes/no_args.sh
source includes/title.sh
# shellcheck source=includes/update_self.sh
source includes/update_self.sh
# shellcheck source=includes/backup.sh
source includes/backup.sh
# Libraries loaded from Heavyscript
# shellcheck source=functions/dns.sh