Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Cp7 m24 migrate the installer and update #6281

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ nbproject/
/vendor/
composer.lock
GPL_LIB/SmartyCache/*
www/install/tmp/*
!www/install/tmp/.gitkeep
www/install/install.conf.php
29 changes: 29 additions & 0 deletions www/install/install.conf.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
$conf_centreon['centreon_dir'] = "/usr/share/centreon/";
$conf_centreon['centreon_etc'] = "/etc/centreon/";
$conf_centreon['centreon_dir_www'] = "/usr/share/centreon/www/";
$conf_centreon['centreon_dir_rrd'] = "/var/lib/centreon";
$conf_centreon['centreon_log'] = "/var/log/centreon";
$conf_centreon['centreon_varlib'] = "/var/lib/centreon";
$conf_centreon['centreon_group'] = "centreon";
$conf_centreon['centreon_user'] = "centreon";
$conf_centreon['rrdtool_dir'] = "/usr/bin/rrdtool";
$conf_centreon['apache_user'] = "apache";
$conf_centreon['apache_group'] = "apache";
$conf_centreon['mail'] = "/bin/mail";
$conf_centreon['broker_user'] = "centreon-broker";
$conf_centreon['broker_group'] = "centreon-broker";
$conf_centreon['broker_etc'] = "/etc/centreon-broker";
$conf_centreon['broker_init_script'] = "cbd";
$conf_centreon['monitoring_user'] = "centreon-engine";
$conf_centreon['monitoring_group'] = "centreon-engine";
$conf_centreon['monitoring_etc'] = "/etc/centreon-engine";
$conf_centreon['monitoring_init_script'] = "centengine";
$conf_centreon['monitoring_binary'] = "/usr/sbin/centengine";
$conf_centreon['monitoring_varlog'] = "/var/log/centreon-engine";
$conf_centreon['plugin_dir'] = "/usr/lib/nagios/plugins";
$conf_centreon['centreon_engine_connectors'] = "/usr/lib64/centreon-connector";
$conf_centreon['centreon_engine_lib'] = "/usr/lib64/centreon-engine";
$conf_centreon['centreonbroker_cbmod'] = "/usr/lib64/nagios/cbmod.so";
$conf_centreon['centreon_plugins'] = "/usr/lib/centreon/plugins";
?>
6 changes: 5 additions & 1 deletion www/install/step_upgrade/step3.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@
if (is_file('../RELEASENOTES.html')) {
$contents = "<div id='releasenotes'></div>";
} else {
$contents = "<textarea cols='100' rows='30' readonly>".file_get_contents('../RELEASENOTES')."</textarea>";
$releasenotesContent = '';
if (file_exists('../RELEASENOTES')) {
$releasenotesContent = file_get_contents('../RELEASENOTES');
}
$contents = "<textarea cols='100' rows='30' readonly>".$releasenotesContent."</textarea>";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

".$releasenotes-Content."< -> " . $releasenotesContent . "<

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me more details about your note?

}

$template->assign('step', STEP_NUMBER);
Expand Down
4 changes: 3 additions & 1 deletion www/install/steps/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ function isSqlComment($str)
function getTemplate($dir)
{
$libDir = __DIR__ . '/../../../GPL_LIB';
require_once $libDir . '/Smarty/libs/Smarty.class.php';
$smartyDir = __DIR__ . '/../../../vendor/smarty/smarty/';
require_once $smartyDir . 'libs/Smarty.class.php';
$template = new \Smarty();
$template->compile_dir = $libDir . '/SmartyCache/compile';
$template->config_dir = $libDir . '/SmartyCache/config';
$template->cache_dir = $libDir . '/SmartyCache/cache';
$template->plugins_dir[] = $libDir . "/smarty-plugins";
$template->template_dir = $dir;
$template->caching = 0;
$template->compile_check = true;
Expand Down
1 change: 1 addition & 0 deletions www/install/tmp/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion www/install/var/phplib
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MySQL:mysql
MySQL:pdo_mysql
GD:gd
LDAP:ldap
XML Writer:xmlwriter
Expand Down