2016-09-14 10:53:04 -05:00
|
|
|
#!/usr/bin/env php
|
2013-11-03 15:03:57 -08:00
|
|
|
<?php
|
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
/*
|
|
|
|
* Configuration to JSON converter
|
|
|
|
* Written by Job Snijders <job@instituut.net>
|
|
|
|
*
|
|
|
|
*/
|
2013-11-03 15:03:57 -08:00
|
|
|
|
2016-09-14 10:53:04 -05:00
|
|
|
chdir(__DIR__); // cwd to the directory containing this script
|
2013-11-03 15:03:57 -08:00
|
|
|
|
2015-08-13 12:28:06 +02:00
|
|
|
// check if we are running through the CLI, otherwise abort
|
2016-09-14 10:53:04 -05: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 15:03:57 -08:00
|
|
|
}
|