change scripts to take server and path from commandline

This commit is contained in:
Evan Prodromou
2009-06-20 14:58:47 -07:00
parent 45430d2b3b
commit 198afa0a1d
15 changed files with 109 additions and 33 deletions

View File

@@ -27,6 +27,11 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
define('LACONICA', true);
// Preset the server at the command line
$server = ($argc > 2) ? $argv[2] : null;
$path = ($argc > 3) ? $argv[3] : null;
require_once(INSTALLDIR . '/lib/common.php');
require_once(INSTALLDIR . '/lib/ping.php');
require_once(INSTALLDIR . '/lib/queuehandler.php');