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

Commit

Permalink
FIX: Remove unused mechanism for modules to add restart/reload action…
Browse files Browse the repository at this point in the history
…s after restart of pollers 21.10.x (#11855)

* removing obsolet code

* removing more useless code
  • Loading branch information
hyahiaoui-ext authored Sep 22, 2022
1 parent 627c093 commit a4db0ea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
10 changes: 0 additions & 10 deletions www/class/centreon.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,12 @@ public function creatModuleList()
$this->modules[$result["name"]] = array(
"name" => $result["name"],
"gen" => false,
"restart" => false,
"license" => false
);

if (is_dir("./modules/" . $result["name"] . "/generate_files/")) {
$this->modules[$result["name"]]["gen"] = true;
}
if (is_dir("./modules/" . $result["name"] . "/restart_pollers/")) {
$this->modules[$result["name"]]["restart"] = true;
}
if (is_dir("./modules/" . $result["name"] . "/restart_pollers/")) {
$this->modules[$result["name"]]["restart"] = true;
}
if (file_exists("./modules/" . $result["name"] . "/license/merethis_lic.zl")) {
$this->modules[$result["name"]]["license"] = true;
}
}
$dbResult = null;
}
Expand Down
12 changes: 0 additions & 12 deletions www/include/configuration/configGenerate/xml/restartPollers.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,18 +246,6 @@ function log_error($errno, $errstr, $errfile, $errline)
$msg_restart[$key] = str_replace("\n", "<br>", $str);
}

/* Find restart / reload action from modules */
foreach ($centreon->modules as $key => $value) {
if (
$value["restart"]
&& $files = glob(_CENTREON_PATH_ . "www/modules/" . $key . "/restart_pollers/*.php")
) {
foreach ($files as $filename) {
include $filename;
}
}
}

$xml->startElement("response");
$xml->writeElement("status", $okMsg);
$xml->writeElement("statuscode", STATUS_OK);
Expand Down

0 comments on commit a4db0ea

Please sign in to comment.