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-r1
@ 2011-09-28 15:23 Christian Ruppert (idl0r)
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Ruppert (idl0r) @ 2011-09-28 15:23 UTC (permalink / raw
  To: gentoo-commits

idl0r       11/09/28 15:23:01

  Added:                haproxy.initd-r1
  Log:
  Improve haproxy init script, bug 384753. Also fix use of deprecated opts variable.
  
  (Portage version: 2.2.0_alpha59/cvs/Linux x86_64)

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

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

Index: haproxy.initd-r1
===================================================================
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-proxy/haproxy/files/haproxy.initd-r1,v 1.1 2011/09/28 15:23:01 idl0r Exp $

extra_commands="checkconfig reload"

CONFFILE=/etc/${SVCNAME}.cfg
PIDFILE=/var/run/${SVCNAME}.pid

depend() {
	need net
	use dns logger
}

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

	ebegin "Checking ${CONFFILE}"
	/usr/bin/haproxy -q -c -f "${CONFFILE}"
	eend $?
}

start() {
	ebegin "Starting ${SVCNAME}"
	start-stop-daemon --pidfile "${PIDFILE}" --exec /usr/bin/haproxy \
		--start -- -D -p "${PIDFILE}" -f "${CONFFILE}"
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"

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

	start-stop-daemon --stop --pidfile "${PIDFILE}"
	eend $?
}

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






^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in net-proxy/haproxy/files: haproxy.initd-r1
@ 2013-04-02 20:30 Christian Ruppert (idl0r)
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Ruppert (idl0r) @ 2013-04-02 20:30 UTC (permalink / raw
  To: gentoo-commits

idl0r       13/04/02 20:30:33

  Removed:              haproxy.initd-r1
  Log:
  Cleanup
  
  (Portage version: 2.1.11.55/cvs/Linux x86_64, signed Manifest commit with key B427ABC8)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-02 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-28 15:23 [gentoo-commits] gentoo-x86 commit in net-proxy/haproxy/files: haproxy.initd-r1 Christian Ruppert (idl0r)
  -- strict thread matches above, loose matches on Subject: below --
2013-04-02 20:30 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