blob: 8b2093b08f191f946b8630942d55e18e8f0d2582 [file] [log] [blame]
Adrià Vilanova Martínez2a088922024-07-06 23:34:44 +02001#!/bin/sh
2set -e
3
4# first arg is `-f` or `--some-option`
5if [ "${1#-}" != "$1" ]; then
6 set -- haproxy "$@"
7fi
8
9if [ "$1" = 'haproxy' ]; then
10 shift # "haproxy"
11 # if the user wants "haproxy", let's add a couple useful flags
12 # -W -- "master-worker mode" (similar to the old "haproxy-systemd-wrapper"; allows for reload via "SIGUSR2")
13 # -db -- disables background mode
14 set -- haproxy -W -db "$@"
15fi
16
17exec "$@"