haproxy/files/docker-entrypoint.sh
Petr "Stone" Hracek a743904ab4 Update tests and fixing Makefile
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
2017-04-05 16:04:11 +02:00

15 lines
No EOL
378 B
Bash
Executable file

#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- haproxy "$@"
fi
if [ "$1" = 'haproxy' ]; then
# if the user wants "haproxy", let's use "haproxy-systemd-wrapper" instead so we can have proper reloadability implemented by upstream
shift # "haproxy"
set -- "$(which haproxy-systemd-wrapper)" -p /run/haproxy.pid "$@"
fi
exec "$@"