load specified config

This commit is contained in:
Sándor 2021-05-28 09:27:44 +02:00
parent 079ac5d30e
commit a9a7a5d939
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ if (!function_exists('json_decode'))
$config = isset($opts['c']) ? $opts['c'] : __DIR__.'/config.json'; $config = isset($opts['c']) ? $opts['c'] : __DIR__.'/config.json';
if (!file_exists($config)) if (!file_exists($config))
logger(1, 'Config file not found: '.$config, 1, true); logger(1, 'Config file not found: '.$config, 1, true);
if (!$_set = @json_decode(@file_get_contents(__DIR__.'/config.json'))) if (!$_set = @json_decode(@file_get_contents($config)))
logger(1, 'Unable to load or parse configuration file', 1, true); logger(1, 'Unable to load or parse configuration file', 1, true);
// Loop indefinitely // Loop indefinitely