Bug 6435: (follow-up) make -daemon really imply -a and -b
authorGalen Charlton <gmc@esilibrary.com>
Sun, 24 Nov 2013 18:20:56 +0000 (18:20 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 24 Nov 2013 18:20:56 +0000 (18:20 +0000)
This patch follows up on the previous patch by moving the
check for whether authority and/or biblio indexing have been
specified so that -daemon has a chance to set those modes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
misc/migration_tools/rebuild_zebra.pl

index 8b9af5c..7e0c83a 100755 (executable)
@@ -83,12 +83,6 @@ if( not defined $run_as_root and $run_user eq 'root') {
     die $msg;
 }
 
-if (not $biblios and not $authorities) {
-    my $msg = "Must specify -b or -a to reindex bibs or authorities\n";
-    $msg   .= "Please do '$0 --help' to see usage.\n";
-    die $msg;
-}
-
 if ( !$as_xml and $nosanitize ) {
     my $msg = "Cannot specify both -no_xml and -nosanitize\n";
     $msg   .= "Please do '$0 --help' to see usage.\n";
@@ -128,6 +122,13 @@ if ($daemon_mode) {
     $process_zebraqueue = 1;
 }
 
+if (not $biblios and not $authorities) {
+    my $msg = "Must specify -b or -a to reindex bibs or authorities\n";
+    $msg   .= "Please do '$0 --help' to see usage.\n";
+    die $msg;
+}
+
+
 #  -v is for verbose, which seems backwards here because of how logging is set
 #    on the CLI of zebraidx.  It works this way.  The default is to not log much
 if ($verbose_logging >= 2) {