From 107ddc1b67ad43b1406e49ea1d45010755dd60e5 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Mon, 23 Feb 2015 15:28:41 +0000 Subject: [PATCH] BUG/MINOR: don't start haproxy on reload If haproxy is not already running, reload should not start it. Unfortunately the LSB spec does not explicitly cover this case: http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html but it seems like the more correct behaviour, and actually fixes a real-world issue we saw in SUSE Cloud. Signed-off-by: Adam Spiers --- examples/haproxy.init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/haproxy.init b/examples/haproxy.init index bf13b1513..d02c36710 100644 --- a/examples/haproxy.init +++ b/examples/haproxy.init @@ -78,6 +78,10 @@ restart() { } reload() { + if ! [ -s $PIDFILE ]; then + return 0 + fi + quiet_check if [ $? -ne 0 ]; then echo "Errors found in configuration file, check it with '$BASENAME check'."