mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: s/reconfigure/reload
There is something strange here, the $force_reload is unused and after stop we don't check the service status so 'running' is still true and it tries to reload instead. Best time to refactor into a mutable service controller?! PR: https://github.com/opnsense/plugins/issues/454 CC: @fraenki
This commit is contained in:
+1
-1
@@ -145,7 +145,7 @@ class ServiceController extends ApiControllerBase
|
||||
// (res)start daemon
|
||||
if ($mdlProxy->general->enabled->__toString() == 1) {
|
||||
if ($runStatus['status'] == "running" && !$force_restart) {
|
||||
$backend->configdRun("haproxy reconfigure");
|
||||
$backend->configdRun("haproxy reload");
|
||||
} else {
|
||||
$this->startAction();
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ if [ -f /etc/rc.conf.d/haproxy ]; then
|
||||
. /etc/rc.conf.d/haproxy
|
||||
fi
|
||||
|
||||
rcprefix=
|
||||
|
||||
case "$1" in
|
||||
stop|restart)
|
||||
if [ "${haproxy_hardstop}" == "YES" ]; then
|
||||
|
||||
@@ -22,11 +22,11 @@ parameters:
|
||||
type:script
|
||||
message:restarting haproxy
|
||||
|
||||
[reconfigure]
|
||||
[reload]
|
||||
command:/usr/local/opnsense/scripts/OPNsense/HAProxy/setup.sh; /usr/local/opnsense/scripts/OPNsense/HAProxy/rc-wrapper.sh reload
|
||||
parameters:
|
||||
type:script
|
||||
message:reconfiguring haproxy
|
||||
message:reloading haproxy
|
||||
|
||||
[configtest]
|
||||
command:/usr/local/etc/rc.d/haproxy configtest 2>&1 || exit 0
|
||||
|
||||
Reference in New Issue
Block a user