getConfigDir(); $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( 'redhat', 'rhel', 'centos', 'fedora', 'suse', 'sles', 'sled', 'opensuse' ), 'addgroup --system icingaweb2' => array('debian', 'ubuntu') ) as $groupadd_ => $distros) { if (in_array($distro, $distros)) { $groupadd = $groupadd_; break; } } switch ($distro) { case 'redhat': case 'rhel': case 'centos': case 'fedora': $usermod = 'usermod -a -G icingaweb2 %s'; $webSrvUser = 'apache'; break; case 'suse': case 'sles': case 'sled': case 'opensuse': $usermod = 'usermod -A icingaweb2 %s'; $webSrvUser = 'wwwrun'; break; case 'debian': case 'ubuntu': $usermod = 'usermod -a -G icingaweb2 %s'; $webSrvUser = 'www-data'; break; default: $usermod = $webSrvUser = null; } } ?>

translate('Welcome to the configuration of Icinga Web 2!') ?>

translate( 'You\'ve already completed the configuration of Icinga Web 2. Note that most of your configuration' . ' files will be overwritten in case you\'ll re-configure Icinga Web 2 using this wizard!' ); ?>

translate( 'This wizard will guide you through the configuration of Icinga Web 2. Once completed and successfully' . ' finished you are able to log in and to explore all the new and stunning features!' ); ?>

getElement('token'); ?> getElement($form->getTokenElementName()); ?> getElement($form->getUidElementName()); ?>
getElement(Wizard::BTN_NEXT); ?>

translate('Generating a New Setup Token'); ?>

translate( '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.' ); ?>

translate('In any case, make sure that all of the following applies to your environment:'); ?>

  • translate('A system group called "icingaweb2" exists'); ?>
  • translate('The user "%s" is a member of the system group "icingaweb2"'), $phpUser); ?>
  • translate('Your webserver\'s user is a member of the system group "icingaweb2"'); ?>
escape($groupadd . ';') ?> escape(sprintf($usermod, $phpUser ?: $webSrvUser) . ';') ?>

translate('If you\'ve got the IcingaCLI installed you can do the following:'); ?>

setup config directory --group icingaweb2; setup token create;

translate('In case the IcingaCLI is missing you can create the token manually:'); ?>

su translate(''); ?> -s /bin/sh -c "mkdir -m 2770 ; chgrp icingaweb2 ; head -c 12 /dev/urandom | base64 | tee ; chmod 0660 ;";

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 ); ?>