Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  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 "$@"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement