From f8534af37500c08ed0694862ab5ea5c95ab31c5d Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 9 Dec 2021 20:02:26 +0200 Subject: [PATCH] haproxy --- install/usr/share/swarmlab.io/sec/sec_bootstrap | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install/usr/share/swarmlab.io/sec/sec_bootstrap b/install/usr/share/swarmlab.io/sec/sec_bootstrap index 307d8aa..186cd62 100755 --- a/install/usr/share/swarmlab.io/sec/sec_bootstrap +++ b/install/usr/share/swarmlab.io/sec/sec_bootstrap @@ -48,6 +48,22 @@ case $ROLE in #tail -f /dev/null #/root/start-nginx.sh #python3 -m gns3server --port 8001 +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 "$@" tail -f /dev/null # Start ssh server #/usr/sbin/sshd -D