mirror of
https://github.com/docker-library/haproxy.git
synced 2026-11-20 21:29:04 +03:00
18 lines
465 B
Bash
Executable File
18 lines
465 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
|
|
# haproxy-systemd-wrapper -- "master-worker mode" (similar to the new "-W" flag; allows for reload via "SIGUSR2")
|
|
# -db -- disables background mode
|
|
set -- "$(which haproxy-systemd-wrapper)" -p /run/haproxy.pid -db "$@"
|
|
fi
|
|
|
|
exec "$@"
|