post_install() {
	if ! getent group haproxy &>/dev/null; then
		groupadd -r haproxy >& /dev/null
	fi
 	if ! getent passwd haproxy &>/dev/null; then
		useradd -r -d /var/lib/haproxy -g haproxy -s /bin/false haproxy
	fi

	chown gerbera:gerbera /var/lib/haproxy
}

post_upgrade() {
	post_install $1
}

post_remove() {
	if getent passwd haproxy &>/dev/null; then
		userdel haproxy >/dev/null
	fi
	if getent group haproxy &>/dev/null; then
		groupdel haproxy >/dev/null
	fi
}
