Bugzilla – Attachment 60344 Details for
Bug 16749
Additional fixes for debian scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16749: Adjustments for koha-plack
Bug-16749-Adjustments-for-koha-plack.patch (text/plain), 3.49 KB, created by
Jonathan Druart
on 2017-02-16 14:07:45 UTC
(
hide
)
Description:
Bug 16749: Adjustments for koha-plack
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-02-16 14:07:45 UTC
Size:
3.49 KB
patch
obsolete
>From 6b1befcd2996f894b44dfcf8c380a52ee30f8af6 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 10 Feb 2017 10:33:57 +0100 >Subject: [PATCH] Bug 16749: Adjustments for koha-plack > >[1] Use run_safe_xmlstarlet for plack workers and requests >[2] Simplify adjust_paths. The lazy export statement is actually enough to > replace adjust_paths by one direct call to adjust_paths_dev_install. > >Test plan: >[1] Copy koha-functions.sh and koha-plack: > cp [YOUR_PATH]/debian/scripts/koha-functions.sh /usr/share/koha/bin/ > cp [YOUR_PATH]/debian/scripts/koha-plack /usr/sbin/ > where YOUR_PATH might well be /home/vagrant/kohaclone. >[2] Make sure that you have dev_install in koha-conf. > Stop and start koha-plack. Verify with ps aux|grep plack. >[3] Rename dev_install to nodev_install (in start and end tag). > Now stop/start koha-plack. Verify with ps aux|grep plack. >[4] Change plack_requests to 51 in your koha-conf. > Restart Plack and check that you see 51 in ps aux|grep plack. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Tested on Jessie (Debian VM and Kohadevbox) > >Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> >Tested in a package installation of master+16749 > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > debian/scripts/koha-plack | 42 +++++++----------------------------------- > 1 file changed, 7 insertions(+), 35 deletions(-) > >diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack >index 245d4a5..cb816a2 100755 >--- a/debian/scripts/koha-plack >+++ b/debian/scripts/koha-plack >@@ -74,16 +74,10 @@ start_plack() > > _check_and_fix_perms $instancename > >- PLACK_MAX_REQUESTS="50" >- PLACK_WORKERS="2" >- >- if [[ $(get_plack_max_requests $instancename) ]]; then >- PLACK_MAX_REQUESTS="$(get_plack_max_requests $instancename)" >- fi >- >- if [[ $(get_plack_workers $instancename) ]]; then >- PLACK_WORKERS="$(get_plack_workers $instancename)" >- fi >+ PLACK_MAX_REQUESTS=$(run_safe_xmlstarlet $instancename plack_max_requests) >+ [ -z $PLACK_MAX_REQUESTS ] && PLACK_MAX_REQUESTS="50" >+ PLACK_WORKERS=$(run_safe_xmlstarlet $instancename plack_workers) >+ [ -z $PLACK_WORKERS ] && PLACK_WORKERS="2" > > STARMANOPTS="-M FindBin --max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS} \ > --user=${instancename}-koha --group ${instancename}-koha \ >@@ -242,30 +236,6 @@ set_action() > fi > } > >-adjust_paths() >-{ >- # Optionally use alternative paths for a dev install >- adjust_paths_dev_install $1 >- >- # PERL5LIB has been read from etc/default, add lib/installer >- # export some vars (for plack.psgi) >- export KOHA_HOME >- if [ "$DEV_INSTALL" = "" ]; then >- export PERL5LIB=$PERL5LIB:$KOHA_HOME/lib/installer >- else >- export DEV_INSTALL >- export PERL5LIB=$PERL5LIB:$KOHA_HOME/installer >- fi >-} >- >-get_plack_max_requests() { >- xmlstarlet sel -t -v 'yazgfs/config/plack_max_requests' "/etc/koha/sites/$1/koha-conf.xml" >-} >- >-get_plack_workers() { >- xmlstarlet sel -t -v 'yazgfs/config/plack_workers' "/etc/koha/sites/$1/koha-conf.xml" >-} >- > STARMAN=$(which starman) > op="" > quiet="no" >@@ -311,7 +281,9 @@ if [ $# -gt 0 ]; then > > if is_instance $name; then > >- adjust_paths $name >+ adjust_paths_dev_install $name >+ export DEV_INSTALL KOHA_HOME PERL5LIB=$PERL5LIB:$KOHA_HOME/installer:$KOHA_HOME/lib/installer >+ > case $op in > "start") > start_plack $name >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16749
:
52561
|
55490
|
60064
|
60103
|
60106
|
60109
|
60110
|
60111
|
60112
|
60113
|
60114
|
60125
|
60126
|
60129
|
60130
|
60131
|
60132
|
60139
|
60140
|
60193
|
60194
|
60195
|
60196
|
60197
|
60335
|
60340
|
60343
| 60344 |
60345
|
60346
|
60347
|
60348
|
60349
|
60350