mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-10 18:34:18 +08:00
15 lines
348 B
Bash
Executable File
15 lines
348 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
. /usr/libexec/haproxy-manager/common.sh
|
|
|
|
CFG="${1:-/etc/haproxy.cfg}"
|
|
if [ "$CFG" != "$HAPROXY_CFG" ]; then
|
|
is_safe_temp_path "$CFG" || { echo "Refusing unsafe HAProxy config path: $CFG" >&2; exit 1; }
|
|
fi
|
|
if ! command -v haproxy >/dev/null 2>&1; then
|
|
echo "haproxy binary is not installed" >&2
|
|
exit 1
|
|
fi
|
|
|
|
haproxy -c -f "$CFG"
|