Skip to content
Snippets Groups Projects
Commit 0a61790f authored by Olav Morken's avatar Olav Morken
Browse files

sanitycheck: Make configuration file optional.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3219 44740490-163a-0410-bde0-09ae8108e29a
parent 97954849
No related branches found
No related tags found
No related merge requests found
......@@ -110,26 +110,6 @@ Add to CRON with
Errors
------
Problem with sanitycheck module
When executing [Run cron [daily]] ==> an error shows up
Cause : module sanitycheck ==> It is active by default (`/var/simplesamlphp/modules/sanitycheck/default-enable`)
* When executing Cron daily It will search all active modules and it executes the hook_cron.php for each one of them in :
`/var/simplesamlphp/modules/<nome_modulo>/hooks/hooks_cron.php`
Meanwhile it is waiting that each module conf file exists in the folder: `/var/simplesamlphp/config/config-<nome_modulo>.php`
It should exist one for the sanitycheck module => `config-sanitycheck.php` but it wasn't there and therefore the error showed up.
Giving an error at this modules it aborted execution for the next active modules.
Configuring the metarefresh module
----------------------------------
......
......@@ -13,12 +13,13 @@ function sanitycheck_hook_cron(&$croninfo) {
try {
$sconfig = SimpleSAML_Configuration::getConfig('config-sanitycheck.php');
if (is_null($sconfig->getValue('cron_tag', NULL))) return;
if ($sconfig->getValue('cron_tag', NULL) !== $croninfo['tag']) return;
$sconfig = SimpleSAML_Configuration::getOptionalConfig('config-sanitycheck.php');
$cronTag = $sconfig->getString('cron_tag', NULL);
if ($cronTag === NULL || $cronTag !== $croninfo['tag']) {
return;
}
$info = array();
$errors = array();
$hookinfo = array(
......
......@@ -2,7 +2,6 @@
$config = SimpleSAML_Configuration::getInstance();
$sconfig = SimpleSAML_Configuration::getConfig('config-sanitycheck.php');
$info = array();
$errors = array();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment