[icinga-checkins] icinga.org: icingaweb2-module-director/next: SettingsForm(Legacy): Add activation script setting

git at icinga.org git at icinga.org
Fri Nov 4 16:38:11 CET 2016


Module: icingaweb2-module-director
Branch: next
Commit: 37f3d1a3e8ff5e8b938aa2bb893460bc6b1b2493
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=37f3d1a3e8ff5e8b938aa2bb893460bc6b1b2493

Author: Markus Frosch <markus.frosch at icinga.com>
Date:   Fri Nov  4 16:36:54 2016 +0100

SettingsForm(Legacy): Add activation script setting

refs #13049

---

 application/forms/SettingsForm.php |   10 ++++++++++
 library/Director/Settings.php      |    1 +
 2 files changed, 11 insertions(+)

diff --git a/application/forms/SettingsForm.php b/application/forms/SettingsForm.php
index ec555d9..f1e401b 100644
--- a/application/forms/SettingsForm.php
+++ b/application/forms/SettingsForm.php
@@ -130,6 +130,16 @@ class SettingsForm extends QuickForm
             ),
             'value' => $settings->getStoredValue('deployment_path_v1')
         ));
+
+        $this->addElement('text', 'activation_script_v1', array(
+            'label'        => $this->translate('Activation Tool'),
+            'description'  => $this->translate(
+                'Script or tool to call when activating a new configuration stage.'
+                . ' (e.g. sudo /usr/local/bin/icinga-director-activate)'
+                . ' (name of the stage will be the argument for the script)'
+            ),
+            'value' => $settings->getStoredValue('activation_script_v1')
+        ));
     }
 
     protected function eventuallyConfiguredEnum($name, $enum)
diff --git a/library/Director/Settings.php b/library/Director/Settings.php
index 2ed854d..8987b9d 100644
--- a/library/Director/Settings.php
+++ b/library/Director/Settings.php
@@ -20,6 +20,7 @@ class Settings
         'enable_audit_log'               => 'n',
         'deployment_mode_v1'             => 'active-passive',
         'deployment_path_v1'             => null,
+        'activation_script_v1'           => null,
         // 'experimental_features'       => null, // 'allow'
         // 'master_zone'                 => null,
     );



More information about the icinga-checkins mailing list