2016-09-14 15:53:04 +00:00
|
|
|
#!/usr/bin/env php
|
2013-11-03 23:03:57 +00:00
|
|
|
<?php
|
|
|
|
|
2015-07-10 11:36:21 +00:00
|
|
|
/*
|
|
|
|
* Configuration to JSON converter
|
|
|
|
* Written by Job Snijders <job@instituut.net>
|
|
|
|
*
|
|
|
|
*/
|
2013-11-03 23:03:57 +00:00
|
|
|
|
2016-09-14 15:53:04 +00:00
|
|
|
chdir(__DIR__); // cwd to the directory containing this script
|
2013-11-03 23:03:57 +00:00
|
|
|
|
2015-08-13 10:28:06 +00:00
|
|
|
// check if we are running through the CLI, otherwise abort
|
2016-09-14 15:53:04 +00:00
|
|
|
if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
|
|
|
|
include_once 'includes/defaults.inc.php';
|
|
|
|
include_once 'config.php';
|
|
|
|
echo json_encode($config);
|
2013-11-03 23:03:57 +00:00
|
|
|
}
|