mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Monit template should always create config even with disabled service
This commit is contained in:
committed by
Franco Fichtner
parent
3f1428dee4
commit
371b6e4693
+5
-1
@@ -355,7 +355,11 @@ class SettingsController extends ApiControllerBase
|
||||
if ($valMsgs->count() == 0) {
|
||||
$mdlMonit->serializeToConfig();
|
||||
Config::getInstance()->save();
|
||||
$result["result"] = "saved";
|
||||
$svcMonit = new ServiceController();
|
||||
$result = $svcMonit->configtestAction();
|
||||
if ($nodeType == 'general' && $node->enabled->__toString() == 0) {
|
||||
$result['stop'] = $svcMonit->stopAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# DO NOT EDIT THIS FILE -- OPNsense auto-generated file
|
||||
|
||||
{% from 'OPNsense/Macros/interface.macro' import physical_interface %}
|
||||
{% if helpers.exists('OPNsense.monit.general.enabled') and OPNsense.monit.general.enabled|default("0") == "1" %}
|
||||
{% if helpers.exists('OPNsense.monit.general') %}
|
||||
set httpd unixsocket /var/run/monit.sock
|
||||
allow localhost
|
||||
|
||||
|
||||
Reference in New Issue
Block a user