Skip to content

Commit 2c03220

Browse files
authored
fix padding for EX_APPS_COUNT (#16)
Signed-off-by: Alexander Piskun <[email protected]>
1 parent 602745f commit 2c03220

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

start.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
sed -i "s|NC_PASSWORD_PLACEHOLDER|$NC_HAPROXY_PASSWORD|" /haproxy.cfg
44

55
if [ -f "/certs/cert.pem" ]; then
6+
EX_APPS_COUNT_PADDED=$(printf "%03d" "$EX_APPS_COUNT")
67
sed -i "s|BIND_ADDRESS_PLACEHOLDER|bind $BIND_ADDRESS:$HAPROXY_PORT v4v6 ssl crt /certs/cert.pem|" /haproxy.cfg
7-
sed -i "s|BIND_ADDRESS_PLACEHOLDER|bind $BIND_ADDRESS:23000-23$EX_APPS_COUNT v4v6 ssl crt /certs/cert.pem|" /haproxy_ex_apps.cfg
8+
sed -i "s|BIND_ADDRESS_PLACEHOLDER|bind $BIND_ADDRESS:23000-23$EX_APPS_COUNT_PADDED v4v6 ssl crt /certs/cert.pem|" /haproxy_ex_apps.cfg
89
sed -i "s|EX_APPS_NET_PLACEHOLDER|$EX_APPS_NET|" /haproxy_ex_apps.cfg
910
# Chmod certs to be accessible by haproxy
1011
chmod 644 /certs/cert.pem

0 commit comments

Comments
 (0)