Miroslav Zagorac | 70230c6 | 2020-12-09 16:54:31 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | _ARG_HAPROXY="${1:-$(realpath -L ${PWD}/../../../haproxy)}" |
| 4 | _ARGS="-f ctx/haproxy.cfg" |
| 5 | _LOG_DIR="_logs" |
Miroslav Zagorac | 1bd0222 | 2022-03-09 17:34:11 +0100 | [diff] [blame] | 6 | _LOG="${_LOG_DIR}/_log-$(basename "${0}" .sh)-$(date +%s)" |
Miroslav Zagorac | 70230c6 | 2020-12-09 16:54:31 +0100 | [diff] [blame] | 7 | |
| 8 | |
| 9 | test -x "${_ARG_HAPROXY}" || exit 1 |
| 10 | mkdir -p "${_LOG_DIR}" || exit 2 |
| 11 | |
| 12 | echo "executing: ${_ARG_HAPROXY} ${_ARGS} > ${_LOG}" |
| 13 | "${_ARG_HAPROXY}" ${_ARGS} >"${_LOG}" 2>&1 |