Bug 18562: Add koha-sip maintenance script
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 30 Jan 2019 11:42:53 +0000 (08:42 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 12 Feb 2019 13:05:35 +0000 (13:05 +0000)
commitc9ca18549ca06c7443ee354b0aa74e56a020acb5
tree5729c22e53f16c806eb3fc9bfef1595ce9823f8e
parent981670c68cb3d12b30c410c12ed6488f5a555117
Bug 18562: Add koha-sip maintenance script

This patch introduces a single script to handle all actions on SIP
servers for Koha instances. It is intended to be a replacement for:

- koha-start-sip
- koha-stop-sip
- koha-enable-sip

It adds a function called is_sip_running to koha-functions.sh.

To test:
- Apply this patch
- Run:
  $ misc4dev/cp_debian_files.pl
  $ sudo koha-sip --enable kohadev
  $ sudo koha-sip --start kohadev
  $ sudo koha-sip --status kohadev
=> SUCCESS: The SIP server is running for kohadev
- Run:
  $ sudo koha-sip --restart --verbose kohadev
  $ sudo koha-sip --status kohadev
=> SUCCESS: The SIP server is running for kohadev
- Run:
  $ sudo koha-sip --stop kohadev
  $ sudo koha-sip --status kohadev
=> SUCCESS: The SIP server is not running for kohadev
- Play with other combinations like enabling an already enabled
instance, etc. Remember you need to remove the
/etc/koha/sites/kohadev/SIPconfig.xml file so it is considered disabled.
- 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>
(cherry picked from commit 6ec979057b2b4f10fe469d2655fa0fcb47af1cb7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
debian/koha-common.install
debian/scripts/koha-functions.sh
debian/scripts/koha-sip [new file with mode: 0755]