From e9c262ceb2bb25d14029a1c25e2d891219dd7c21 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy 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 Tested on Jessie (Debian VM and Kohadevbox) Signed-off-by: Mirko Tietgen Tested in a package installation of master+16749 Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer --- debian/scripts/koha-plack | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack index 72e21f43e2..5d2799a3d4 100755 --- a/debian/scripts/koha-plack +++ b/debian/scripts/koha-plack @@ -231,22 +231,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 -} - STARMAN=$(which starman) op="" quiet="no" @@ -292,7 +276,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.39.5