[icinga-checkins] icinga.org: icingaweb2/master: Add --path argument to the setup' s welcome page examples if necessary

git at icinga.org git at icinga.org
Wed Nov 26 08:58:23 CET 2014


Module: icingaweb2
Branch: master
Commit: ff19696429d87d1220226808bbfca46505b18d67
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=ff19696429d87d1220226808bbfca46505b18d67

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Wed Nov 26 08:52:46 2014 +0100

Add --path argument to the setup's welcome page examples if necessary

refs #7581

---

 modules/setup/application/views/scripts/form/setup-welcome.phtml |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/setup/application/views/scripts/form/setup-welcome.phtml b/modules/setup/application/views/scripts/form/setup-welcome.phtml
index 7db2fd0..572e429 100644
--- a/modules/setup/application/views/scripts/form/setup-welcome.phtml
+++ b/modules/setup/application/views/scripts/form/setup-welcome.phtml
@@ -5,7 +5,8 @@ use Icinga\Application\Config;
 use Icinga\Application\Platform;
 use Icinga\Web\Wizard;
 
-$setupTokenPath = rtrim(Icinga::app()->getConfigDir(), '/') . '/setup.token';
+$configDir = Icinga::app()->getConfigDir();
+$setupTokenPath = rtrim($configDir, '/') . '/setup.token';
 $cliPath = realpath(Icinga::app()->getApplicationDir() . '/../bin/icingacli');
 
 ?>
@@ -44,7 +45,7 @@ $cliPath = realpath(Icinga::app()->getApplicationDir() . '/../bin/icingacli');
       ); ?></p>
       <p><?= mt('setup', 'If you\'ve got the IcingaCLI installed you can do the following:'); ?></p>
       <div class="code">
-        <span><?= $cliPath ? $cliPath : 'icingacli'; ?> setup config createDirectory <?= ($user = Platform::getPhpUser()) !== null ? $user : 'your_webserver_group'; ?>;</span>
+        <span><?= $cliPath ? $cliPath : 'icingacli'; ?> setup config createDirectory <?= ($user = Platform::getPhpUser()) !== null ? $user : 'your_webserver_group'; ?><?= $configDir !== '/etc/icingaweb' ? ' --path ' . $configDir : ''; ?>;</span>
         <span><?= $cliPath ? $cliPath : 'icingacli'; ?> setup token create;</span>
       </div>
       <p><?= mt('setup', 'In case the IcingaCLI is missing you can create the token manually:'); ?></p>



More information about the icinga-checkins mailing list