Spaces:
Runtime error
Runtime error
Download start.bash from Vadnir/load-balancer: direct link, hf CLI and curl.
- Browser
- Download file 500 Bytes
-
https://huggingface.co/spaces/Vadnir/load-balancer/resolve/main/start.bash
- Command line
-
hf download hf://spaces/Vadnir/load-balancer/start.bash
-
curl -L -o start.bash https://huggingface.co/spaces/Vadnir/load-balancer/resolve/main/start.bash
500 Bytes
| # | |
| # start.bash | |
| # | |
| HAPROXY="/etc/haproxy" | |
| OVERRIDE="/haproxy-override" | |
| PIDFILE="/var/run/haproxy.pid" | |
| CONFIG="haproxy.cfg" | |
| ERRORS="errors" | |
| cd "$HAPROXY" | |
| # Symlink errors directory | |
| if [[ -d "$OVERRIDE/$ERRORS" ]]; then | |
| mkdir -p "$OVERRIDE/$ERRORS" | |
| rm -fr "$ERRORS" | |
| ln -s "$OVERRIDE/$ERRORS" "$ERRORS" | |
| fi | |
| # Symlink config file. | |
| if [[ -f "$OVERRIDE/$CONFIG" ]]; then | |
| rm -f "$CONFIG" | |
| ln -s "$OVERRIDE/$CONFIG" "$CONFIG" | |
| fi | |
| exec haproxy -f /etc/haproxy/haproxy.cfg -p "$PIDFILE" |