account for a single peer listed for keepalive

This commit is contained in:
aptalca 2023-01-10 14:09:40 -05:00
parent 841ffdf730
commit 1fc1cd5f35

View File

@ -135,7 +135,7 @@ if [ -n "$PEERS" ]; then
PEERS_ARRAY=($(echo "$PEERS" | tr ',' ' '))
fi
PEERS_COUNT=$(echo "${#PEERS_ARRAY[@]}")
if [ "${PERSISTENTKEEPALIVE_PEERS}" = "all" ] || [ "${PERSISTENTKEEPALIVE_PEERS}" =~ *,* ]; then
if [ -n "${PERSISTENTKEEPALIVE_PEERS}" ]; then
echo "**** PersistentKeepalive will be set for: ${PERSISTENTKEEPALIVE_PEERS/,/ } ****"
PERSISTENTKEEPALIVE_PEERS_ARRAY=($(echo "$PERSISTENTKEEPALIVE_PEERS" | tr ',' ' '))
fi