Bug 15188 - Fixes remove_unused_authorities.pl will delete all authorities if zebra...
[koha.git] / misc / migration_tools / remove_unused_authorities.pl
index 2509318..af8897a 100755 (executable)
@@ -45,6 +45,10 @@ if ($test) {
     print "testing only, authorities will not be deleted.\n";
 }
 
+if (C4::Context->Zconn("biblioserver",0)->errcode() == 10000) {
+    die "Zebra server seems not to be available. This script needs Zebra runs."
+}
+
 my $dbh=C4::Context->dbh;
 my $thresholdmin=0;
 my $thresholdmax=0;