diff --git a/modules/backup/acronis-install.sh b/modules/backup/acronis-install.sh index 2bbb87d..1b24ca9 100755 --- a/modules/backup/acronis-install.sh +++ b/modules/backup/acronis-install.sh @@ -254,18 +254,20 @@ fi echo "" # Make executable -if ! chmod +x "Cyber_Protection_Agent_for_Linux_x86_64.bin"; then - print_error "Failed to set executable permissions" +chmod +x "Cyber_Protection_Agent_for_Linux_x86_64.bin" 2>/dev/null + +# Verify file exists and has size +if [ ! -f "Cyber_Protection_Agent_for_Linux_x86_64.bin" ]; then + print_error "Installer file not found" cd / rm -rf "$TEMP_DIR" press_enter exit 1 fi -# Verify file is executable -if [ ! -x "Cyber_Protection_Agent_for_Linux_x86_64.bin" ]; then - print_error "Installer file is not executable" - ls -lh "Cyber_Protection_Agent_for_Linux_x86_64.bin" +file_size=$(stat -c%s "Cyber_Protection_Agent_for_Linux_x86_64.bin" 2>/dev/null || echo "0") +if [ "$file_size" -lt 1000000 ]; then + print_error "Installer file is too small (possibly corrupted)" cd / rm -rf "$TEMP_DIR" press_enter @@ -279,10 +281,10 @@ echo -e "${DIM}───────────────────── if [ -z "$INSTALL_FLAGS" ]; then # Interactive mode - run directly - bash ./Cyber_Protection_Agent_for_Linux_x86_64.bin + ./Cyber_Protection_Agent_for_Linux_x86_64.bin else - # Unattended mode - bash ./Cyber_Protection_Agent_for_Linux_x86_64.bin $INSTALL_FLAGS + # Unattended mode - need to pass flags properly + ./Cyber_Protection_Agent_for_Linux_x86_64.bin $INSTALL_FLAGS fi INSTALL_EXIT_CODE=$?