[icinga-checkins] icinga.org: icingaweb2/feature/setup-wizard-7163: Show the full path to the CLI if possible

git at icinga.org git at icinga.org
Tue Nov 11 10:19:53 CET 2014


Module: icingaweb2
Branch: feature/setup-wizard-7163
Commit: 856b159d50d2969b99861b92c7299514406c9334
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=856b159d50d2969b99861b92c7299514406c9334

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Tue Nov 11 10:19:32 2014 +0100

Show the full path to the CLI if possible

refs #7163

---

 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 bc7c57c..c299afe 100644
--- a/modules/setup/application/views/scripts/form/setup-welcome.phtml
+++ b/modules/setup/application/views/scripts/form/setup-welcome.phtml
@@ -6,6 +6,7 @@ use Icinga\Application\Platform;
 use Icinga\Web\Wizard;
 
 $setupTokenPath = rtrim(Icinga::app()->getConfigDir(), '/') . '/setup.token';
+$cliPath = realpath(Icinga::app()->getApplicationDir() . '/../bin/icingacli');
 
 ?>
 <div class="welcome-page">
@@ -71,8 +72,8 @@ $setupTokenPath = rtrim(Icinga::app()->getConfigDir(), '/') . '/setup.token';
       ); ?></p>
       <p><?= mt('setup', 'If you\'ve got the IcingaCLI installed you can do the following:'); ?></p>
       <div class="code">
-        <span>icingacli setup config createDirectory <?= ($user = Platform::getPhpUser()) !== null ? $user : 'your_webserver_group'; ?>;</span>
-        <span>icingacli setup token create;</span>
+        <span><?= $cliPath ? $cliPath : 'icingacli'; ?> setup config createDirectory <?= ($user = Platform::getPhpUser()) !== null ? $user : 'your_webserver_group'; ?>;</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>
       <div class="code">



More information about the icinga-checkins mailing list