From 1fc1cd5f354ddfd424d932471feb487fbc711ea0 Mon Sep 17 00:00:00 2001 From: aptalca Date: Tue, 10 Jan 2023 14:09:40 -0500 Subject: [PATCH] account for a single peer listed for keepalive --- root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run b/root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run index 925caee..f386671 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run +++ b/root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run @@ -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