summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-09-21 14:29:43 -0400
committerEvan Prodromou <evan@status.net>2009-09-21 14:29:43 -0400
commit6a088afd4be4076a31e8713ed96ac62060bf7278 (patch)
tree3f6da4d5bc05ad7146ef9f0b23022abf2dd5bbb8
parenteb41d9e5da6a9d1e9b31ca017b5534eb6bd25b32 (diff)
you can add a daemon to getvaliddaemons
-rw-r--r--EVENTS.txt5
-rwxr-xr-xscripts/getvaliddaemons.php29
2 files changed, 24 insertions, 10 deletions
diff --git a/EVENTS.txt b/EVENTS.txt
index 56f91f87a..d3b58ffb0 100644
--- a/EVENTS.txt
+++ b/EVENTS.txt
@@ -264,4 +264,7 @@ EndEnqueueNotice: after adding a notice to the queues
UnqueueHandleNotice: Handle a notice when no queue manager is available
- $notice: the notice to handle
-- $queue: the "queue" that is being executed \ No newline at end of file
+- $queue: the "queue" that is being executed
+
+GetValidDaemons: Just before determining which daemons to run
+- &$daemons: modifiable list of daemon scripts to run, filenames relative to scripts/
diff --git a/scripts/getvaliddaemons.php b/scripts/getvaliddaemons.php
index 8f48e8e6f..92edacfd3 100755
--- a/scripts/getvaliddaemons.php
+++ b/scripts/getvaliddaemons.php
@@ -35,20 +35,31 @@ ENDOFHELP;
require_once INSTALLDIR.'/scripts/commandline.inc';
+$daemons = array();
+
if(common_config('xmpp','enabled')) {
- echo "xmppdaemon.php jabberqueuehandler.php publicqueuehandler.php ";
- echo "xmppconfirmhandler.php ";
+ $daemons[] = 'xmppdaemon.php';
+ $daemons[] = 'jabberqueuehandler.php';
+ $daemons[] = 'publicqueuehandler.php';
+ $daemons[] = 'xmppconfirmhandler.php';
}
if(common_config('twitterbridge','enabled')) {
- echo "twitterstatusfetcher.php ";
+ $daemons[] = 'twitterstatusfetcher.php';
}
-echo "ombqueuehandler.php ";
+$daemons[] = 'ombqueuehandler.php';
if (common_config('twitter', 'enabled')) {
- echo "twitterqueuehandler.php ";
- echo "synctwitterfriends.php ";
+ $daemons[] = 'twitterqueuehandler.php';
+ $daemons[] = 'synctwitterfriends.php';
}
-echo "facebookqueuehandler.php ";
-echo "pingqueuehandler.php ";
+$daemons[] = 'facebookqueuehandler.php';
+$daemons[] = 'pingqueuehandler.php';
if (common_config('sms', 'enabled')) {
- echo "smsqueuehandler.php ";
+ $daemons[] = 'smsqueuehandler.php';
+}
+
+if (Event::handle('GetValidDaemons', array(&$daemons))) {
+ foreach ($daemons as $daemon) {
+ print $daemon . ' ';
+ }
+ print "\n";
}