We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0d045a commit 8494b91Copy full SHA for 8494b91
.env
@@ -11,7 +11,7 @@ PRIORITY=100
11
ROUTER_ID=52
12
VIRTUAL_IPS=192.168.1.100/24
13
UNICAST_SRC_IP=192.168.1.101
14
-UNICAST_PEERS=192.168.1.102
+UNICAST_PEERS="192.168.1.102,192.168.1.103,192.168.1.104"
15
WEIGHT=50
16
FALL=2
17
RISE=2
docker-entrypoint.sh
@@ -7,6 +7,9 @@ if [ -n "$TZ" ]; then
7
echo "$TZ" > /etc/timezone
8
fi
9
10
+# Format the UNICAST_PEERS for proper indentation
+export UNICAST_PEERS=$(echo "$UNICAST_PEERS" | tr ',' '\n' | sed 's/^[[:space:]]*//g' | sed 's/[[:space:]]*$//g' | sed 's/^/ /')
+
# Generate keepalived configuration from template
envsubst < /conf/keepalived.conf_tpl > /etc/keepalived/keepalived.conf
0 commit comments