diff --git a/modules/backup/acronis-logs.sh b/modules/backup/acronis-logs.sh index 9ca6348..b542c93 100755 --- a/modules/backup/acronis-logs.sh +++ b/modules/backup/acronis-logs.sh @@ -275,7 +275,7 @@ while true; do # Check if numeric selection for specific log file if [[ "$choice" =~ ^[0-9]+$ ]]; then log_files=($(find "$LOG_DIR" -name "*.log" -type f | sort)) - if [ $choice -gt 0 ] && [ $choice -le ${#log_files[@]} ]; then + if [ "${choice:-0}" -gt 0 ] && [ "${choice:-0}" -le ${#log_files[@]} ]; then selected_log="${log_files[$((choice-1))]}" clear print_banner "Log: $(basename "$selected_log")" diff --git a/modules/backup/acronis-register.sh b/modules/backup/acronis-register.sh index 7d56db4..f42689c 100755 --- a/modules/backup/acronis-register.sh +++ b/modules/backup/acronis-register.sh @@ -171,7 +171,7 @@ echo -e "${DIM}───────────────────── echo "" # Check result -if [ $REG_EXIT_CODE -eq 0 ]; then +if [ "${REG_EXIT_CODE:-0}" -eq 0 ]; then print_success "Registration successful!" echo "" diff --git a/modules/backup/acronis-uninstall.sh b/modules/backup/acronis-uninstall.sh index dcd594a..7b64055 100755 --- a/modules/backup/acronis-uninstall.sh +++ b/modules/backup/acronis-uninstall.sh @@ -214,7 +214,7 @@ if [ -d "/var/lib/Acronis" ] || [ -d "/usr/lib/Acronis" ]; then ((remaining++)) fi -if [ $remaining -eq 0 ]; then +if [ "${remaining:-0}" -eq 0 ]; then echo "Acronis Cyber Protect has been completely removed from this system." else echo ""