From 6ec3a0972f89bc1fd81682a7502d52cf93cb5a7d Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Tue, 29 Dec 2015 16:46:38 +0100 Subject: [PATCH] Bug 15188 - remove_unused_authorities.pl dies if zebra server is not running --- misc/migration_tools/remove_unused_authorities.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/migration_tools/remove_unused_authorities.pl b/misc/migration_tools/remove_unused_authorities.pl index 2509318..af8897a 100755 --- a/misc/migration_tools/remove_unused_authorities.pl +++ b/misc/migration_tools/remove_unused_authorities.pl @@ -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; -- 1.7.10.4