From 95511a1a88054112672a25c3c25aed9b4b2fb6f2 Mon Sep 17 00:00:00 2001
From: "Alexander A. Klimov"
Date: Mon, 23 Jan 2023 15:25:53 +0100
Subject: [PATCH] setup: welcome page: on Docker remove redundant instructions
(cherry picked from commit 73dcf2bc89b2d149ecc73111a4866ea6ee0e1747)
---
.../application/views/scripts/form/setup-welcome.phtml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/setup/application/views/scripts/form/setup-welcome.phtml b/modules/setup/application/views/scripts/form/setup-welcome.phtml
index 0284aa5d8..1be68f3f6 100644
--- a/modules/setup/application/views/scripts/form/setup-welcome.phtml
+++ b/modules/setup/application/views/scripts/form/setup-welcome.phtml
@@ -11,6 +11,8 @@ $setupTokenPath = rtrim($configDir, '/') . '/setup.token';
$cliPath = realpath(Icinga::app()->getApplicationDir() . '/../bin/icingacli');
$groupadd = null;
+$docker = getenv('ICINGAWEB_OFFICIAL_DOCKER_IMAGE');
+
if (! (false === ($distro = Platform::getLinuxDistro(1)) || $distro === 'linux')) {
foreach (array(
'groupadd -r icingaweb2' => array(
@@ -79,6 +81,7 @@ if (! (false === ($distro = Platform::getLinuxDistro(1)) || $distro === 'linux')
'To run this wizard a user needs to authenticate using a token which is usually'
. ' provided to him by an administrator who\'d followed the instructions below.'
); ?>
+
= $this->translate('In any case, make sure that all of the following applies to your environment:'); ?>
- = $this->translate('A system group called "icingaweb2" exists'); ?>
@@ -95,14 +98,19 @@ if (! (false === ($distro = Platform::getLinuxDistro(1)) || $distro === 'linux')
= $this->translate('If you\'ve got the IcingaCLI installed you can do the following:'); ?>
+
+
= $cliPath ? $cliPath : 'icingacli'; ?> setup config directory --group icingaweb2= $configDir !== '/etc/icingaweb2' ? ' --config ' . $configDir : ''; ?>;
+
= $cliPath ? $cliPath : 'icingacli'; ?> setup token create;
+
= $this->translate('In case the IcingaCLI is missing you can create the token manually:'); ?>
su = $phpUser ?: $this->translate(''); ?> -s /bin/sh -c "mkdir -m 2770 = dirname($setupTokenPath); ?>; chgrp icingaweb2 = dirname($setupTokenPath); ?>; head -c 12 /dev/urandom | base64 | tee = $setupTokenPath; ?>; chmod 0660 = $setupTokenPath; ?>;";
+
= sprintf(
$this->translate('Please see the %s for an extensive description on how to access and use this wizard.'),
'' . $this->translate('Icinga Web 2 documentation') . '' // TODO: Add link to iw2 docs which points to the installation topic