From 3c1b4245b555e2606c98204b151e248469839562 Mon Sep 17 00:00:00 2001 From: conradverm Date: Fri, 19 Oct 2007 12:22:47 +0000 Subject: [PATCH] KTS-2524 "Create document indexer shutdown script" Fixed. --- search2/indexing/bin/shutdown.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+), 0 deletions(-) create mode 100644 search2/indexing/bin/shutdown.php diff --git a/search2/indexing/bin/shutdown.php b/search2/indexing/bin/shutdown.php new file mode 100644 index 0000000..992066d --- /dev/null +++ b/search2/indexing/bin/shutdown.php @@ -0,0 +1,52 @@ +get('indexer/coreClass'); + +$sure=false; +$indexall = false; +if ($argc > 0) +{ + foreach($argv as $arg) + { + switch (strtolower($arg)) + { + case 'positive': + $sure=true; + break; + case 'help': + print "Usage: shutdown.php [positive]\n"; + exit; + } + } +} +if (!$sure) +{ + print "* " . _kt("Are you sure you want to do this? Add 'positive' as a parameter to continue.") . "\n"; + exit; +} + +require_once('indexing/indexerCore.inc.php'); + +$indexer = Indexer::get(); +$indexer->shutdown(); + +print "\n* " . _kt("The request to shutdown has been sent to the server. It may take a few seconds.") . "\n"; + + +print _kt("Done.") . "\n"; + + +?> \ No newline at end of file -- libgit2 0.21.4