SHARE
TWEET

Untitled

a guest Nov 22nd, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. set -e
  3.  
  4. # first arg is `-f` or `--some-option`
  5. if [ "${1#-}" != "$1" ]; then
  6.     set -- haproxy "$@"
  7. fi
  8.  
  9. if [ "$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 "$@"
  15. fi
  16.  
  17. exec "$@"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top