unifios-utilities/haproxy/50-haproxy.sh
buckmelanoma 588d3495f8
Add missing 'fi', fix indentation, fix comment (#322)
Script doesn't run without fi on the last line.  Fixed cloudflare comment lines.
2022-02-06 01:14:18 -08:00

15 lines
386 B
Bash

#!/bin/sh
CONTAINER=haproxy
# Starts an haproxy container that is deleted after it is stopped.
# All configs stored in /mnt/data/haproxy
if podman container exists "$CONTAINER"; then
podman start "$CONTAINER"
else
podman run -d --net=host --restart always \
--name haproxy \
--hostname ha.proxy \
-v "/mnt/data/haproxy/:/usr/local/etc/haproxy/" \
haproxy:latest
fi