diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-05-25 22:50:19 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-05-25 22:50:19 -0700 |
commit | 1780ebafd36861023f5e79a4ae387544f37d675d (patch) | |
tree | de7256685dbd3b0ceee94f1b7b0a408d8449381b /util/service_class | |
parent | 9e6e41c6cb7b43da80b771e651a5dbdfc3960688 (diff) | |
parent | f7731d7e8f08c30f85d1a8c22730638e7ef00445 (diff) | |
download | volse-hubzilla-1780ebafd36861023f5e79a4ae387544f37d675d.tar.gz volse-hubzilla-1780ebafd36861023f5e79a4ae387544f37d675d.tar.bz2 volse-hubzilla-1780ebafd36861023f5e79a4ae387544f37d675d.zip |
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'util/service_class')
-rwxr-xr-x | util/service_class | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/util/service_class b/util/service_class new file mode 100755 index 000000000..e762d8ad6 --- /dev/null +++ b/util/service_class @@ -0,0 +1,34 @@ +#!/usr/bin/env php +<?php + +// Temporary service class utility - see baseurl/help/service_classes + +require_once('include/cli_startup.php'); + +cli_startup(); + +if($argc > 3) { + $d = get_config('service_class', $argv[1]); + $d[$argv[2]] = $argv[3]; + set_config('service_class', $argv[1], $d); + echo 'Updated service class "' . $argv[1] . '" service "' . $argv[2] . '" to ' . $argv[3] . "\n"; +} + +if($argc == 2) { + $d = get_config('service_class', $argv[1]); + echo $argv[1] . ":\n"; + foreach($d as $k => $v) { + echo "$k = $v\n"; + } +} + +if($argc == 1) { + load_config('service_class'); + foreach($a->config['service_class'] as $class=>$props) { + echo "$class:\n"; + $d = unserialize($props); + foreach($d as $k => $v) { + echo "\t$k = $v\n"; + } + } +}
\ No newline at end of file |