aboutsummaryrefslogtreecommitdiffstats
path: root/main/haproxy/haproxy.pre-install
blob: 85cefc98146f1e5c6ef32e3f9d42ffd1aaaf21f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

addgroup -S haproxy 2>/dev/null
adduser -S -D -H -h /var/lib/haproxy -s /bin/false \
	-G haproxy -g haproxy haproxy 2>/dev/null

# move config to new location
if [ -e /etc/haproxy.cfg ] && ! [ -e /etc/haproxy/haproxy.cfg ]; then
	mkdir -p /etc/haproxy
	mv /etc/haproxy.cfg /etc/haproxy/haproxy.cfg
fi

exit 0