#!/usr/bin/env php . */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $shortoptions = 'r::'; $longoptions = array('resource::'); $helptext = <<log(LOG_ERR, "Got an XMPPHP_Exception: " . $e->getMessage()); exit(1); } } } // Abort immediately if xmpp is not enabled, otherwise the daemon chews up // lots of CPU trying to connect to unconfigured servers if (common_config('xmpp','enabled')==false) { print "Aborting daemon - xmpp is disabled\n"; exit(); } if (have_option('r')) { $resource = get_option_value('r'); } else if (have_option('--resource')) { $resource = get_option_value('--resource'); } else if (count($args) > 0) { $resource = $args[0]; } else { $resource = null; } $handler = new JabberQueueHandler($resource); $handler->runOnce();