1
0
mirror of https://github.com/docker-library/haproxy.git synced 2025-04-17 23:57:35 +03:00
haproxy/docker-entrypoint.sh
2024-05-23 10:14:39 -07:00

18 lines
417 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
shift # "haproxy"
# if the user wants "haproxy", let's add a couple useful flags
# -W -- "master-worker mode" (similar to the old "haproxy-systemd-wrapper"; allows for reload via "SIGUSR2")
# -db -- disables background mode
set -- haproxy -W -db "$@"
fi
exec "$@"