Bug 22235: Make maintenance scripts use koha-sip instead of koha-*-sip
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 30 Jan 2019 12:37:47 +0000 (09:37 -0300)
committerroot <root@f1ebe1bec408>
Mon, 11 Feb 2019 18:30:10 +0000 (18:30 +0000)
This patch makes all maintenance scripts use **koha-sip** instead of
the old **koha-*-sip** scripts.

To test:
- Run:
  $ perl misc4dev/cp_debian_files.pl
  $ sudo service koha-common stop
=> SUCCESS: No errors and the SIP-related sevices are stopped
  $ sudo service koha-common start
=> SUCCESS: No errors and the SIP-related services are started
  $ sudo service koha-common restart
=> SUCCESS: No erros and SIP-related services are running
  $ sudo koha-create --create-db test
  $ sudo koha-sip --enable test
  $ sudo koha-sip --start test
  $ sudo koha-disable test
=> SUCCESS: No errors, instance disabled, no SIP running for test
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

debian/docs/koha-common.xml
debian/koha-common.init
debian/scripts/koha-disable

index 96a9cf4..492545b 100644 (file)
 
     <refsect2><title>SIP2-related</title>
     <variablelist>
+      <varlistentry>
+        <term><option>koha-sip</option></term>
+        <listitem>
+          <para>Manage the SIP server for named Koha instances.</para>
+        </listitem>
+      </varlistentry>
 
       <varlistentry>
         <term><option>koha-enable-sip</option></term>
index a223ec6..99df08b 100755 (executable)
@@ -10,7 +10,7 @@
 #                    if enabled, start:
 #                      - a Zebra server (using koha-zebra)
 #                      - a Plack server (using koha-plack)
-#                      - a SIP server   (using koha-start-sip)
+#                      - a SIP server   (using koha-sip)
 ### END INIT INFO
 
 # Author: Lars Wirzenius <lars@catalyst.net.nz>
@@ -58,7 +58,7 @@ do_start()
     # We insure all required directories exist, including disabled ones.
     koha-create-dirs $(koha-list)
     koha-zebra --start $(koha-list --enabled)
-    koha-start-sip $(koha-list --enabled)
+    koha-sip   --start $(koha-list --enabled --sip)
     koha-plack --start $(koha-list --enabled --plack)
 
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
@@ -73,7 +73,7 @@ do_stop()
 {
     # We stop everything, including disabled ones.
     koha-zebra --stop $(koha-list) || true
-    koha-stop-sip $(koha-list) || true
+    koha-sip   --stop $(koha-list --sip)
     koha-plack --stop --quiet $(koha-list --enabled --plack)
 
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
@@ -86,8 +86,7 @@ do_stop()
 #
 do_reload() {
     koha-zebra --restart $(koha-list --enabled)
-    koha-stop-sip $(koha-list) || true
-    koha-start-sip $(koha-list --enabled)
+    koha-sip   --restart $(koha-list --enabled --sip)
     koha-plack --restart --quiet $(koha-list --enabled --plack)
 
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
index e9169f1..6332303 100755 (executable)
@@ -64,7 +64,7 @@ do
         if [ "$RET" = 0 ]; then
             restart_apache="yes"
             if is_sip_enabled $name; then
-                koha-stop-sip $name
+                koha-sip --stop $name
             fi
             if is_zebra_running $name; then
                 koha-zebra --stop $name