#!/bin/bash set -o pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" #SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" source "$SCRIPT_DIR/functions.sh" show_usage() { echo "Usage: $0 " echo "Example: $0 /etc/openvpn/server/server/ipp.txt" exit 1 } main() { # Check permissions check_permissions # Process arguments [[ $# -lt 1 ]] && show_usage local ipp_file=$1 # Validate CCD file path check_ccd_path "$ipp_file" # Get client IPs (remove trailing commas) sed 's/,$//' "$ipp_file" exit 0 } main "$@"