Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Aug 2018 19:19:26 +0000 (UTC)
From:      Dmitry Sivachenko <demon@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r477980 - in head/net: haproxy-devel/files haproxy/files
Message-ID:  <201808241919.w7OJJQYm045239@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: demon
Date: Fri Aug 24 19:19:26 2018
New Revision: 477980
URL: https://svnweb.freebsd.org/changeset/ports/477980

Log:
  Add 'softreload' command for seamless haproxy reload (-x option).
  
  PR:		230305
  Submitted by:	Frank Wall <fw@moov.de>

Modified:
  head/net/haproxy-devel/files/haproxy.in
  head/net/haproxy/files/haproxy.in

Modified: head/net/haproxy-devel/files/haproxy.in
==============================================================================
--- head/net/haproxy-devel/files/haproxy.in	Fri Aug 24 19:12:40 2018	(r477979)
+++ head/net/haproxy-devel/files/haproxy.in	Fri Aug 24 19:19:26 2018	(r477980)
@@ -29,21 +29,29 @@
 name="haproxy"
 rcvar=haproxy_enable
 command="%%PREFIX%%/sbin/haproxy"
-extra_commands="reload configtest hardstop hardreload"
+extra_commands="reload configtest hardstop hardreload softreload"
 reload_cmd="haproxy_reload"
 hardreload_cmd="haproxy_reload"
 hardreload_precmd="def_hardreload_option"
+softreload_cmd="haproxy_reload"
+softreload_precmd="def_softreload_option"
 stop_cmd="haproxy_stop"
 hardstop_cmd="haproxy_stop"
 hardstop_precmd="def_hardstop_signal"
 
 : ${haproxy_enable:="NO"}
 : ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"}
+: ${haproxy_socket:="/var/run/${name}/socket"}
 pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"}
 
 def_hardreload_option()
 {
     reload_opt="-st"
+}
+
+def_softreload_option()
+{
+    reload_opt="-x ${haproxy_socket} -sf"
 }
 
 def_hardstop_signal()

Modified: head/net/haproxy/files/haproxy.in
==============================================================================
--- head/net/haproxy/files/haproxy.in	Fri Aug 24 19:12:40 2018	(r477979)
+++ head/net/haproxy/files/haproxy.in	Fri Aug 24 19:19:26 2018	(r477980)
@@ -29,21 +29,29 @@
 name="haproxy"
 rcvar=haproxy_enable
 command="%%PREFIX%%/sbin/haproxy"
-extra_commands="reload configtest hardstop hardreload"
+extra_commands="reload configtest hardstop hardreload softreload"
 reload_cmd="haproxy_reload"
 hardreload_cmd="haproxy_reload"
 hardreload_precmd="def_hardreload_option"
+softreload_cmd="haproxy_reload"
+softreload_precmd="def_softreload_option"
 stop_cmd="haproxy_stop"
 hardstop_cmd="haproxy_stop"
 hardstop_precmd="def_hardstop_signal"
 
 : ${haproxy_enable:="NO"}
 : ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"}
+: ${haproxy_socket:="/var/run/${name}/socket"}
 pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"}
 
 def_hardreload_option()
 {
     reload_opt="-st"
+}
+
+def_softreload_option()
+{
+    reload_opt="-x ${haproxy_socket} -sf"
 }
 
 def_hardstop_signal()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808241919.w7OJJQYm045239>