| 1 | #!/bin/env bash |
| 2 | set -e |
| 3 | |
| 4 | if [ "$#" -eq 0 ]; then |
| 5 | set -- prometheus-varnish-exporter |
| 6 | elif [[ "$1" == -* ]]; then |
| 7 | # If the first argument starts with a dash, prepend the default command |
| 8 | set -- prometheus-varnish-exporter "$@" |
| 9 | else |
| 10 | # Otherwise, use the provided command as is |
| 11 | set -- "$@" |
| 12 | fi |
| 13 | |
| 14 | exec "$@" |