Skip to content

Commit

Permalink
fix padding for EX_APPS_COUNT (#16)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 authored Feb 23, 2024
1 parent 602745f commit 2c03220
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
sed -i "s|NC_PASSWORD_PLACEHOLDER|$NC_HAPROXY_PASSWORD|" /haproxy.cfg

if [ -f "/certs/cert.pem" ]; then
EX_APPS_COUNT_PADDED=$(printf "%03d" "$EX_APPS_COUNT")
sed -i "s|BIND_ADDRESS_PLACEHOLDER|bind $BIND_ADDRESS:$HAPROXY_PORT v4v6 ssl crt /certs/cert.pem|" /haproxy.cfg
sed -i "s|BIND_ADDRESS_PLACEHOLDER|bind $BIND_ADDRESS:23000-23$EX_APPS_COUNT v4v6 ssl crt /certs/cert.pem|" /haproxy_ex_apps.cfg
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
sed -i "s|EX_APPS_NET_PLACEHOLDER|$EX_APPS_NET|" /haproxy_ex_apps.cfg
# Chmod certs to be accessible by haproxy
chmod 644 /certs/cert.pem
Expand Down

0 comments on commit 2c03220

Please sign in to comment.