public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-proxy/haproxy/files: haproxy.initd-r2
@ 2012-09-30 22:07 Christian Ruppert (idl0r)
  0 siblings, 0 replies; only message in thread
From: Christian Ruppert (idl0r) @ 2012-09-30 22:07 UTC (permalink / raw
  To: gentoo-commits

idl0r       12/09/30 22:07:40

  Added:                haproxy.initd-r2
  Log:
  Version bump to 1.4.22, bug 436686.
  
  (Portage version: 2.1.11.9/cvs/Linux i686)

Revision  Changes    Path
1.1                  net-proxy/haproxy/files/haproxy.initd-r2

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-proxy/haproxy/files/haproxy.initd-r2?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-proxy/haproxy/files/haproxy.initd-r2?rev=1.1&content-type=text/plain

Index: haproxy.initd-r2
===================================================================
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-proxy/haproxy/files/haproxy.initd-r2,v 1.1 2012/09/30 22:07:40 idl0r Exp $

extra_commands="checkconfig"
extra_started_commands="reload"

command="/usr/bin/haproxy"
pidfile="/var/run/${SVCNAME}.pid"

if [ -z "${CONFFILE}" -a -d "/etc/haproxy" -a -f "/etc/haproxy/${SVCNAME}.cfg" ]; then
	CONFFILE=/etc/haproxy/${SVCNAME}.cfg
else
	CONFFILE=/etc/${SVCNAME}.cfg
fi

command_args="-D -p ${pidfile} -f ${CONFFILE}"

depend() {
	need net
	use dns logger
}

checkconfig() {
	if [ ! -f "${CONFFILE}" ]; then
		eerror "${CONFFILE} does not exist!"
		return 1
	fi

	ebegin "Checking ${CONFFILE}"
	$command -q -c -f "${CONFFILE}"
	eend $?
}

stop_pre() {
	if [ "${RC_CMD}" = "restart" ]; then
		checkconfig || return 1
	fi
}

reload() {
	ebegin "Reloading ${SVCNAME}"
	checkconfig || { eerror "Reloading failed, please fix your ${CONFFILE} first"; return 1; }
	$command -D -p "${pidfile}" -f "${CONFFILE}" -sf $(cat "${pidfile}")
	eend $?
}





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-30 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30 22:07 [gentoo-commits] gentoo-x86 commit in net-proxy/haproxy/files: haproxy.initd-r2 Christian Ruppert (idl0r)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox