Koha-clms/debian
Lari Taskula 8673c798d5
Bug 27115: Use start-stop-daemon to stop in koha-sip
There has been an issue where a restart of koha-sip would sometimes not bring
the SIP server back alive. This is because we have not been waiting for
koha-sip --stop to actually stop the SIP server(s). It is then possible for a
restart to attempt the --start command while a previous instance of SIP server
is still running. As the --start command in this case is not allowed, we would
then end up not starting the SIP server(s) at all.

This patch replaces daemon --stop with start-stop-daemon --stop to ensure
koha-sip daemon actually stops.

start-stop-daemon provides us the --retry option, which we are able to utilize
in waiting for the stop process to finish.

To test:
1. Before applying this patch
2. Run this command

export SIPINSTANCE="your_koha_instance_name"

You can your_koha_instance_name using the koha-list command

3. Configure a SIP server (add some min_servers, e.g. 6, to SIPConfig.xml)
4. koha-sip --enable $SIPINSTANCE
5. koha-sip --verbose --start $SIPINSTANCE
6. Observe "Starting SIP server for ..."
7. koha-sip --verbose --stop $SIPINSTANCE; ps aux | grep $SIPINSTANCE-koha-sip
8. Observe "Stopping SIP server for instancename"
9. In the output, observe the number of SIP servers you defined in step 3, plus
   one.
10. koha-sip --verbose --start $SIPINSTANCE
11. Apply this patch, or edit the koha-sip directly to get changes in place
in your environment, e.g. using command

nano $(which koha-sip)

12. koha-sip --verbose --stop $SIPINSTANCE; ps aux | grep $SIPINSTANCE-koha-sip
13. Observe "Stopping SIP server for instancename"
14. In the output, observe no more SIP servers alive

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-16 14:07:15 -07:00
..
docs Bug 32736: Add --all-queues switch to koha-worker 2026-01-12 10:26:06 -07:00
scripts Bug 27115: Use start-stop-daemon to stop in koha-sip 2026-01-16 14:07:15 -07:00
source Bug 32994: Remove compiled files from src (2) 2023-02-22 10:03:25 -03:00
templates Bug 40993: (QA follow-up) use L flag to stop the rewrite after PT action 2026-01-12 10:53:37 -07:00
README.build
…
bd-to-depends Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
build-git-snapshot Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
changelog Update debian/changelog file: 22.12.00-3 2023-02-20 09:44:12 -03:00
clean Bug 32994: Remove compiled files from src (2) 2023-02-22 10:03:25 -03:00
compat Bug 18908: Warning "Compatibility levels before 9 are deprecated" 2018-03-19 13:55:47 -03:00
control Bug 40164: (follow-up) Update debian/control 2025-07-08 15:41:58 -06:00
control.in Bug 25691: Replace link to non-existing README with wiki link 2024-01-16 12:06:08 +01:00
copyright Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.README.Debian
…
koha-common.bash-completion Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.config Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.cron.d Bug 17717: Make cronjobs using koha-foreach use --chdir 2018-03-15 08:22:04 +00:00
koha-common.cron.daily Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.cron.hourly Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.cron.monthly Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.default Bug 16830: Remove -x usage on koha-indexer 2016-08-04 19:41:41 +00:00
koha-common.dirs Bug 17951: Make koha-create set template_cache_dir correctly 2017-12-22 13:15:39 -03:00
koha-common.docs Bug 35713: Remove outdated debian/docs/LEEME.Debian file 2024-01-11 12:10:45 +01:00
koha-common.init Bug 33108: (follow-up) Don't let restart die if ES indexer not running 2023-03-20 09:39:48 -03:00
koha-common.install Bug 33108: koha-es-indexer added 2023-03-20 09:39:45 -03:00
koha-common.links Bug 22238: Remove koha-*-sip scripts in favor of koha-sip 2019-02-11 18:30:10 +00:00
koha-common.logrotate Bug 19610: Make koha-common.logrotate use copytruncate 2018-02-27 15:58:33 -03:00
koha-common.postinst Bug 36954: (follow-up) Return to the two logfiles pattern 2025-02-18 10:55:27 +01:00
koha-common.preinst Bug 25485: Remove tiny_mce symlink during pre install of deb package 2020-05-20 09:15:13 +01:00
koha-common.service Bug 33371: Add [Install] section to koha-common.service 2023-06-01 11:55:28 -03:00
koha-common.templates Bug 11404: Make the install process aware of the changes 2014-05-19 21:50:54 +00:00
koha-core.bash-completion Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-core.config Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-core.default Bug 26672: Add additional koha-core and koha-full files to ./debian 2020-11-25 16:18:03 +01:00
koha-core.dirs Bug 26672: Add additional koha-core and koha-full files to ./debian 2020-11-25 16:18:03 +01:00
koha-core.docs Bug 35713: Remove outdated debian/docs/LEEME.Debian file 2024-01-11 12:10:45 +01:00
koha-core.init Bug 32922: (follow-up) Fix two additional occurences 2023-02-20 09:44:07 -03:00
koha-core.install Bug 33108: koha-es-indexer added 2023-03-20 09:39:45 -03:00
koha-core.links Bug 26672: Add additional koha-core and koha-full files to ./debian 2020-11-25 16:18:03 +01:00
koha-core.logrotate Bug 26672: Add additional koha-core and koha-full files to ./debian 2020-11-25 16:18:03 +01:00
koha-core.postinst Bug 36954: (follow-up) Return to the two logfiles pattern 2025-02-18 10:55:27 +01:00
koha-core.preinst Bug 26672: Add additional koha-core and koha-full files to ./debian 2020-11-25 16:18:03 +01:00
koha-core.templates Bug 26672: Add additional koha-core and koha-full files to ./debian 2020-11-25 16:18:03 +01:00
koha-full.postinst Bug 26672: Add additional koha-core and koha-full files to ./debian 2020-11-25 16:18:03 +01:00
koha-post-install-setup Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha.README.Debian
…
koha.apache-ports
…
koha.config
…
koha.dirs
…
koha.install Bug 14302: Remove GRS1 specific code 2018-08-31 11:24:20 +00:00
koha.postinst Bug 25691: Replace link to non-existing README with wiki link 2024-01-16 12:06:08 +01:00
koha.postrm
…
koha.prerm
…
list-deps Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
rules Bug 33168: (follow-up) Swap spaces for tabs 2023-04-04 11:26:20 +02:00
unavailable.html
…
update-control
…

README.build

In order to build .deb packages, following debian packages need to be present
(installed): 
devscripts
pbuilder
dh-make
fakeroot

As root (or sudo) execute:
pbuilder create

Executing build-git-snapshot without any arguments will leave package and the
rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly
recommended that --buildresult option is used.