Bug 24993: Make sure SIP server is stopped before restarting it
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 2 Apr 2020 10:36:16 +0000 (12:36 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 14 Apr 2020 07:32:48 +0000 (08:32 +0100)
Sometimes doing koha-sip --restart instance happens too fast and
the SIP server is not started.

To test:
- have SIP enabled and running for your instance
- issue a restart, make sure it restarts
  sudo koha-sip --restart inst

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

debian/scripts/koha-sip

index 00d337f..fd3c538 100755 (executable)
@@ -154,6 +154,9 @@ restart_sip()
         local noLF="-n"
         [ "$verbose" != "no" ] && noLF=""
         echo $noLF `stop_sip ${name}`
+        while is_sip_running ${name}; do
+            sleep 1;
+        done
         echo $noLF `start_sip ${name}`
     else
         if [ "$verbose" != "no" ]; then