--- haproxy-1.3.15.7.ebuild 2009-01-10 12:36:33.000000000 +0100 +++ haproxy-1.3.15.7-r1.ebuild 2009-03-14 17:14:17.000000000 +0100 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-proxy/haproxy/haproxy-1.3.15.7.ebuild,v 1.1 2009/01/10 11:36:33 mrness Exp $ -inherit versionator +inherit versionator eutils DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" HOMEPAGE="http://haproxy.1wt.eu" @@ -22,6 +22,13 @@ emake ADDINC="${CFLAGS}" LDFLAGS="${LDFLAGS}" ${ARGS} } +pkg_setup() { + ebegin "Creating haproxy user and group" + enewgroup haproxy + enewuser haproxy -1 -1 -1 haproxy + eend ${?} +} + src_install() { exeinto /usr/bin doexe haproxy @@ -37,7 +44,12 @@ pkg_postinst() { if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then - einfo "You need to create /etc/haproxy.cfg before you start haproxy service." + einfo "" + einfo "You need to create /etc/haproxy.cfg before you start the haproxy service." + einfo "It's best practice to not run haproxy as root, user and group haproxy was therefore created." + einfo "Make use of them with the \"user\" and \"group\" directives." + einfo "" + if [[ -d "${ROOT}/usr/share/doc/${P}" ]]; then einfo "Please consult the installed documentation for learning the configuration file's syntax." einfo "The documentation and sample configuration files are installed here:"