summaryrefslogtreecommitdiff
path: root/net/haproxy
diff options
context:
space:
mode:
Diffstat (limited to 'net/haproxy')
-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