diff --git a/net/haproxy/src/opnsense/scripts/OPNsense/HAProxy/rc-wrapper.sh b/net/haproxy/src/opnsense/scripts/OPNsense/HAProxy/rc-wrapper.sh index 3ade2075d..017581fc6 100755 --- a/net/haproxy/src/opnsense/scripts/OPNsense/HAProxy/rc-wrapper.sh +++ b/net/haproxy/src/opnsense/scripts/OPNsense/HAProxy/rc-wrapper.sh @@ -19,6 +19,13 @@ reload) rcprefix="hard" fi ;; +restart) + # The RC script always performs a "graceful" stop when using the + # "restart" command. This behaviour cannot be altered. So we have to + # manually perform a "hardstop" now. + if [ "${haproxy_hardstop}" == "YES" ]; then + /usr/local/etc/rc.d/haproxy hardstop + fi esac /usr/local/etc/rc.d/haproxy ${rcprefix}${1}