Skip to content

Commit

Permalink
check variables if exist
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinab25 authored Mar 10, 2023
1 parent 2517f32 commit 15f8c2b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions haproxy/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/bash

#fix variable _name to not have /
export FRONTEND_NAME="${FRONTEND_NAME//\//}"
export BACKEND_NAME="${BACKEND_NAME//\//}"
if [ -n "$FRONTEND_NAME" ]; then
export FRONTEND_NAME="${FRONTEND_NAME//\//}"
fi
if [ -n "$BACKEND_NAME" ]; then
export BACKEND_NAME="${BACKEND_NAME//\//}"
fi

# haproxy not directly configured within /usr/local/etc/haproxy/haproxy.cfg
if ! test -e /usr/local/etc/haproxy/haproxy.cfg; then
Expand Down

0 comments on commit 15f8c2b

Please sign in to comment.