Bug 31348: Make koha-plack stop gracefully

0. Apply patch
1. cp /usr/sbin/koha-plack /usr/sbin/koha-plack.bak
2. cp debian/scripts/koha-plack /usr/sbin/koha-plack
3. Now at roughly the same time do the following two actions:
    3a. Go to http://localhost:8081/cgi-bin/koha/about.pl
    3b. koha-plack --stop kohadev
4. Note that the HTTP request completes
5. Click on "Home"
6. Note that the error is "Service Unavailable" rather than "Proxy Error",
which would've occurred with an interrupted HTTP request/response

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
David Cook 2022-08-12 02:27:52 +00:00 committed by Tomas Cohen Arazi
parent 0bd98b1db9
commit 5155e43b04
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ stop_plack()
log_daemon_msg "Stopping Plack daemon for ${instancename}"
if start-stop-daemon --pidfile ${PIDFILE} --user="${instancename}-koha" --stop --retry=TERM/30/KILL/5; then
if start-stop-daemon --pidfile ${PIDFILE} --user="${instancename}-koha" --stop --retry=QUIT/30/KILL/5; then
log_end_msg 0
else
log_end_msg 1