From ff19696429d87d1220226808bbfca46505b18d67 Mon Sep 17 00:00:00 2001
From: Johannes Meyer
Date: Wed, 26 Nov 2014 08:52:46 +0100
Subject: [PATCH] Add --path argument to the setup's welcome page examples if
necessary
refs #7581
---
.../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 7db2fd0d9..572e429d3 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');
); ?>
= mt('setup', 'If you\'ve got the IcingaCLI installed you can do the following:'); ?>
- = $cliPath ? $cliPath : 'icingacli'; ?> setup config createDirectory = ($user = Platform::getPhpUser()) !== null ? $user : 'your_webserver_group'; ?>;
+ = $cliPath ? $cliPath : 'icingacli'; ?> setup config createDirectory = ($user = Platform::getPhpUser()) !== null ? $user : 'your_webserver_group'; ?>= $configDir !== '/etc/icingaweb' ? ' --path ' . $configDir : ''; ?>;
= $cliPath ? $cliPath : 'icingacli'; ?> setup token create;
= mt('setup', 'In case the IcingaCLI is missing you can create the token manually:'); ?>