svn commit: r378727 - head/net/haproxy/files
Dmitry Sivachenko
demon at FreeBSD.org
Mon Feb 9 13:06:12 UTC 2015
Author: demon
Date: Mon Feb 9 13:06:11 2015
New Revision: 378727
URL: https://svnweb.freebsd.org/changeset/ports/378727
QAT: https://qat.redports.org/buildarchive/r378727/
Log:
Fix stop action to stop correctly multi-process haproxy instance.
PR: 197024
Submitted by: ard_1 at mail.ru
Modified:
head/net/haproxy/files/haproxy.in
Modified: head/net/haproxy/files/haproxy.in
==============================================================================
--- head/net/haproxy/files/haproxy.in Mon Feb 9 12:45:27 2015 (r378726)
+++ head/net/haproxy/files/haproxy.in Mon Feb 9 13:06:11 2015 (r378727)
@@ -31,6 +31,7 @@ rcvar=haproxy_enable
command="%%PREFIX%%/sbin/haproxy"
extra_commands="reload configtest"
reload_cmd="haproxy_reload"
+stop_cmd="haproxy_stop"
: ${haproxy_enable:="NO"}
: ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"}
@@ -100,4 +101,17 @@ haproxy_reload()
fi
}
+haproxy_stop()
+{
+ rc_pid=$(check_pidfile ${pidfile} ${command})
+ if [ $rc_pid ]; then
+ rc_pid=$(cat ${pidfile})
+ kill -$sig_stop $rc_pid
+ wait_for_pids $rc_pid
+ else
+ _run_rc_notrunning
+ return 1
+ fi
+}
+
run_rc_command "$1"
More information about the svn-ports-all
mailing list