diff options
author | redmatrix <git@macgirvin.com> | 2016-06-19 19:12:33 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-19 19:12:33 -0700 |
commit | fb61c4fb3497d3751bb43f12cadee9e9c7776be9 (patch) | |
tree | 604989e10424456783fccff1fccc5b14da26db7f /Zotlabs/Daemon/Master.php | |
parent | bfaabfb7b5ff639992a01b0e1fc374cd43d536e9 (diff) | |
parent | 4578649f758e65f1d87ebb98da7cd891d0b90d0d (diff) | |
download | volse-hubzilla-fb61c4fb3497d3751bb43f12cadee9e9c7776be9.tar.gz volse-hubzilla-fb61c4fb3497d3751bb43f12cadee9e9c7776be9.tar.bz2 volse-hubzilla-fb61c4fb3497d3751bb43f12cadee9e9c7776be9.zip |
Merge branch '1.8RC'
Diffstat (limited to 'Zotlabs/Daemon/Master.php')
-rw-r--r-- | Zotlabs/Daemon/Master.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Master.php b/Zotlabs/Daemon/Master.php new file mode 100644 index 000000000..56076f612 --- /dev/null +++ b/Zotlabs/Daemon/Master.php @@ -0,0 +1,31 @@ +<?php + +namespace Zotlabs\Daemon; + +if(array_search( __file__ , get_included_files()) === 0) { + + require_once('include/cli_startup.php'); + array_shift($argv); + $argc = count($argv); + + if($argc) + Master::Release($argc,$argv); + killme(); +} + + + +class Master { + + static public function Summon($arr) { + proc_run('php','Zotlabs/Daemon/Master.php',$arr); + } + + static public function Release($argc,$argv) { + cli_startup(); + logger('Master: release: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG); + require_once('Zotlabs/Daemon/' . $argv[0] . '.php'); + $cls = '\\Zotlabs\\Daemon\\' . $argv[0]; + $cls::run($argc,$argv); + } +}
\ No newline at end of file |