mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net/haproxy: migrate to NAME_setup use, refs 4e01cb2333
NAME_setup is mostly being used during system startup. However, there are still cases where setup.sh is manually called to ensure that certain operations like syntax check are working properly.
This commit is contained in:
parent
5cd2297802
commit
c7d77ce9bf
3 changed files with 2 additions and 10 deletions
|
|
@ -56,8 +56,6 @@ class ServiceController extends ApiMutableServiceControllerBase
|
|||
$backend = new Backend();
|
||||
// first generate template based on current configuration
|
||||
$backend->configdRun('template reload OPNsense/HAProxy');
|
||||
// now export all the required files (or syntax check will fail)
|
||||
$backend->configdRun("haproxy setup");
|
||||
// finally run the syntax check
|
||||
$response = $backend->configdRun("haproxy configtest");
|
||||
return array("result" => $response);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
[setup]
|
||||
command:/usr/local/opnsense/scripts/OPNsense/HAProxy/setup.sh
|
||||
parameters:
|
||||
type:script_output
|
||||
message:setup haproxy service requirements
|
||||
|
||||
[start]
|
||||
command:/usr/local/opnsense/scripts/OPNsense/HAProxy/setup.sh deploy; /usr/local/opnsense/scripts/OPNsense/HAProxy/rc-wrapper.sh start
|
||||
parameters:
|
||||
|
|
@ -31,7 +25,7 @@ description:Reload HAProxy service
|
|||
message:reloading haproxy
|
||||
|
||||
[configtest]
|
||||
command:/usr/local/sbin/haproxy -c -f /usr/local/etc/haproxy.conf.staging 2>&1 || exit 0
|
||||
command:/usr/local/opnsense/scripts/OPNsense/HAProxy/setup.sh; /usr/local/sbin/haproxy -c -f /usr/local/etc/haproxy.conf.staging 2>&1 || exit 0
|
||||
parameters:
|
||||
type:script_output
|
||||
message:testing haproxy configuration
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{% if helpers.exists('OPNsense.HAProxy.general.enabled') and OPNsense.HAProxy.general.enabled|default("0") == "1" %}
|
||||
haproxy_enable=YES
|
||||
#haproxy_setup="/usr/local/opnsense/scripts/OPNsense/HAProxy/setup.sh"
|
||||
haproxy_setup="/usr/local/opnsense/scripts/OPNsense/HAProxy/setup.sh"
|
||||
haproxy_pidfile="/var/run/haproxy.pid"
|
||||
haproxy_config="/usr/local/etc/haproxy.conf"
|
||||
{% if helpers.exists('OPNsense.HAProxy.general.storeOcsp') and OPNsense.HAProxy.general.storeOcsp|default("0") == "1" %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue