Also, return 0 rather than return 1 in else clause of koha-zebra
Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test plan:
1. Stop plack, indexer, sip, worker, z3950 and zebra.
Note: To test Z39.50 restarting you will need to setup the server: https://wiki.koha-community.org/wiki/Setting_up_the_Z39.50_and_SRU_Server#Setting_up_the_Z39.50_and_SRU_Server
2. Run restart command for each service:
- [Plack] sudo koha-plack --restart {instance}
- [Indexer] sudo koha-indexer --restart {instance}
- [SIP] sudo koha-sip --restart {instance}
- [Worker] sudo koha-worker --restart {instance}
- [z3950] sudo koha-z3950-responder --restart {instance}
- [Zebra] sudo koha-zebra --restart {instance}
3. Observe the services do not get restarted.
Instead you get an error saying the service is not running
4. Apply patch
5. If you are using kohadevbox you must copy koha-* scripts to /usr/sbin/:
sudo cp debian/scripts/koha-plack /usr/sbin/koha-plack
sudo cp debian/scripts/koha-indexer /usr/sbin/koha-indexer
sudo cp debian/scripts/koha-sip /usr/sbin/koha-sip
sudo cp debian/scripts/koha-worker /usr/sbin/koha-worker
sudo cp debian/scripts/koha-z3950-responder /usr/sbin/koha-z3950-responder
sudo cp debian/scripts/koha-zebra /usr/sbin/koha-zebra
6. Repeat step 2
7. This time confirm that each service is restarted
Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aparently ((i++)) isn't portable, changed for an admittedly uglier
but functional increment.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
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>
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>
To test:
- Enable sip for your testing instance
sudo koha-sip --enable inst
- Start sip for your testing instance
sudo koha-sip --start inst
- Verify it is running
ps ax |grep sip -> you should see processes
- Disable sip for your testing intance
sudo koha-sip --disable inst
- Verify that the following has happened:
* SIP is no longer running for your instance - no SIP processes
* SIP Cannot be started for the instance because it is not enabled.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes koha-sip --start calls mention 'SIP server' instead of
the wrong 'Zebra daemon'.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch corrects a typo, and exports KOHA_CONF as other scripts do.
To test:
- Apply this patch
- Run:
$ # in kohadevbox
$ perl misc4dev/cp_debian_files.pl
- Try the new script
$ sudo koha-sip --start kohadev
=> SUCCESS: tail -f /var/log/koha/kohadev/sip* doesn't show fatal errors
anymore
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch removes traces from the (deprecated) koha-*-sip scripts.
To test:
- Apply the patch
- Verify no traces of koha-*-sip remain on the codebase (besides
Release Notes, koha-common.links and the koha-sip script):
$ cd kohaclone
$ git grep koha-start-sip
$ git grep koha-stop-sip
$ git grep koha-enable-sip
=> SUCCESS: No traces!
- Create the following symlinks:
$ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-start-sip
$ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-stop-sip
$ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-enable-sip
- Try the koha-*-zebra commands:
$ sudo koha-stop-sip kohadev
$ sudo koha-start-sip kohadev
$ sudo koha-restart-sip kohadev
=> SUCCESS: They all work as expected!
- 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>
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>