aports/main/haproxy/haproxy.pre-install
Przemyslaw Pawelczyk da4e96aace Reorder arguments passed to addgroup/adduser in scripts.
Now all invocations have following order of arguments (if present):

    addgroup -S -g ... GROUP
    adduser -S -u ... -D -H -h ... -s ... -G ... -g ... USER
2016-04-25 06:56:47 +00:00

14 lines
320 B
Bash

#!/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