summaryrefslogtreecommitdiff
path: root/net/haproxy/files
diff options
context:
space:
mode:
authorDmitry Sivachenko <demon@FreeBSD.org>2014-10-03 15:40:31 +0000
committerDmitry Sivachenko <demon@FreeBSD.org>2014-10-03 15:40:31 +0000
commitdc5d1564a5ae30f4ecd03f5329d13093fe36f101 (patch)
treebd5161ebd3415bbba231b25c28f23be168e70191 /net/haproxy/files
parentMore mdocml fixes (diff)
Do not search for process by name;
rather use all pids stored in pidfile, in multi-process mode haoroxy writes all pids there. PR: 192430 Submitted by: renchap@cocoa-x.com
Notes
Notes: svn path=/head/; revision=369911
Diffstat (limited to 'net/haproxy/files')
-rw-r--r--net/haproxy/files/haproxy.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/haproxy/files/haproxy.in b/net/haproxy/files/haproxy.in
index e2caf3bb4f15..1f1c5dd3fa4e 100644
--- a/net/haproxy/files/haproxy.in
+++ b/net/haproxy/files/haproxy.in
@@ -43,9 +43,9 @@ command="%%PREFIX%%/sbin/haproxy"
# Load Configs/Set Defaults
load_rc_config $name
: ${haproxy_enable:="NO"}
-: ${haproxy_pidfile:="/var/run/haproxy.pid"}
+pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"}
: ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"}
-: ${haproxy_flags="-q -f ${haproxy_config} -p ${haproxy_pidfile}"}
+: ${haproxy_flags="-q -f ${haproxy_config} -p ${pidfile}"}
procname=${command}
# Update the globals
@@ -68,12 +68,12 @@ haproxy_reload()
if [ $? -ne 0 ]; then
err 1 "Error found in ${haproxy_config} - not reloading current process!"
fi
- rc_pid=$(check_process ${procname})
- if [ -n "$rc_pid" ]; then
+ rc_pid=$(check_pidfile ${pidfile} ${command})
+ if [ $rc_pid ]; then
if [ $rc_force ]; then
- ${command} ${haproxy_flags} -st ${rc_pid}
+ ${command} ${haproxy_flags} -st $(cat ${pidfile})
else
- ${command} ${haproxy_flags} -sf ${rc_pid}
+ ${command} ${haproxy_flags} -sf $(cat ${pidfile})
fi
else
_run_rc_notrunning