aboutsummaryrefslogtreecommitdiffstats
path: root/util/config
diff options
context:
space:
mode:
authorTreer <treer.git@the-bordello.com>2016-04-25 19:00:10 +1000
committerTreer <treer.git@the-bordello.com>2016-04-25 19:00:10 +1000
commit78320ee3a611b414dfd685bf36dfb0553bb2f1e3 (patch)
tree2d1a795845a0a62919e2f65bdf659ff907979e0a /util/config
parente5e68d7350109a8e13d0375858a1a9ad78cec455 (diff)
downloadvolse-hubzilla-78320ee3a611b414dfd685bf36dfb0553bb2f1e3.tar.gz
volse-hubzilla-78320ee3a611b414dfd685bf36dfb0553bb2f1e3.tar.bz2
volse-hubzilla-78320ee3a611b414dfd685bf36dfb0553bb2f1e3.zip
add commandline help to util/config
Diffstat (limited to 'util/config')
-rwxr-xr-xutil/config40
1 files changed, 38 insertions, 2 deletions
diff --git a/util/config b/util/config
index 9e90eca56..5113bd8ec 100755
--- a/util/config
+++ b/util/config
@@ -7,9 +7,45 @@ require_once('include/cli_startup.php');
cli_startup();
-if($argc > 3) {
-
+$helpArgs = getopt('h', array('help'));
+if (count($helpArgs) === 1) {
+ echo <<<'EndOfOutput'
+Gets, sets, or lists site-wide configuration settings.
+
+Usage: util/config
+ util/config <family>
+ util/config <family> <key>
+ util/config <family> <key> <value>
+
+ util/config
+ Displays all config entries
+
+ util/config <family>
+ Displays all config entries for family (system, database, etc)
+
+ util/config <family> <key>
+ Displays single config entry for the specified family and key
+
+ util/config <family> <key> <value>
+ Set config entry for specified family and key to value and display result
+
+Notes:
+ Setting config entries which are manually set in .htconfig.php may result
+ in conflict between database settings and the manual startup settings.
+
+ For channel-specific configuration settings, use util/pconfig
+
+ Details for configuration options can be found at:
+
+EndOfOutput;
+ echo ' ' . App::get_baseurl() . '/help/hidden_configs' . PHP_EOL . PHP_EOL;
+ return;
+}
+
+
+
+if($argc > 3) {
set_config($argv[1],$argv[2],$argv[3]);
echo "config[{$argv[1]}][{$argv[2]}] = " . printable_config(get_config($argv[1],$argv[2])) . "\n";
}