#!/bin/bash checkSSHRemoteRequirement() { if [[ $CFG_REQUIREMENT_SSHREMOTE == "true" ]]; then ### Custom SSH Remote Install if [[ -n "$CFG_IPS_SSH_SETUP" ]]; then ip_found=0 # Split the comma-separated IP addresses into an array IFS=',' read -ra ip_addresses <<< "$CFG_IPS_SSH_SETUP" # Loop through the IP addresses for ip in "${ip_addresses[@]}"; do ip_found=1 done if [ "$ip_found" -eq 0 ]; then isSuccessful "No Remote SSH Install IP has been found to setup" else isSuccessful "Remote SSH Install IP(s) have been found to setup" setupSSHRemoteKeys=true ((preinstallneeded++)) fi else isSuccessful "No hosts found in the configuration." fi fi }