From 568aa2dbcd1fd3b68b800072f5febd91ed026573 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 8 Apr 2020 11:57:06 +0200 Subject: [PATCH] Bug 24993: Make sure we are not going to loop indefinitely --- debian/scripts/koha-sip | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/scripts/koha-sip b/debian/scripts/koha-sip index fd3c538a06..2a4ea791c8 100755 --- a/debian/scripts/koha-sip +++ b/debian/scripts/koha-sip @@ -154,8 +154,15 @@ restart_sip() local noLF="-n" [ "$verbose" != "no" ] && noLF="" echo $noLF `stop_sip ${name}` + + MAX_ITERATION=10 while is_sip_running ${name}; do + ((i++)) + if [ $MAX_ITERATION -lt $i ]; then + break + fi sleep 1; + done echo $noLF `start_sip ${name}` else -- 2.20.1