DIR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to etc\ne.g. root, var/lib/pve-cluster etc." 1168 --title "Directory to work in (No leading or trailing slashes):" 3>&1 1>&2 2>&3)
DIR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to /etc/\ne.g. /root/, /var/lib/pve-cluster/ etc." 1168 --title "Directory to work in:" 3>&1 1>&2 2>&3)
if[ -z "$DIR"];then
DIR="etc"
DIR="/etc/"
else
DIR="$DIR"
fi
DIR_DASH=$(echo"$DIR"| tr '/''-')
BACKUP_FILE="$(hostname)-${DIR_DASH}-backup"
BACKUP_FILE="$(hostname)${DIR_DASH}backup"
selected_directories=()
whileread -r dir;do
@ -45,7 +45,7 @@ start() {
MSG_MAX_LENGTH=$((${#DIRNAME}+$OFFSET))
fi
CTID_MENU+=("$DIRNAME""$dir""OFF")
done < <(ls -d /${DIR}/*)
done < <(ls -d ${DIR}*)
while[ -z "${HOST_BACKUP:+x}"];do
HOST_BACKUP=$(whiptail --backtitle "Proxmox VE Host Backup" --title "Working in the ${DIR} directory " --checklist \