From e3161f64fbbe5eb38d55f527bf89c908d554e360 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 23 May 2024 06:47:44 +0000 Subject: [PATCH] Bug 36932: Add deployment parameter to koha-plack Content-Type: text/plain; charset=utf-8 Test plan (needs dev_install or ktd): Add a die in a script somewhere to simulate a crash. * For example in opac-main.pl: die "Line 43"; Run koha-plack --restart without -dep and hit that page. Dev output? Run koha-plack --restart with -dep and hit page again. No dev output? Signed-off-by: Marcel de Rooy --- debian/scripts/koha-plack | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack index 28f5430c72..c1ece25f2f 100755 --- a/debian/scripts/koha-plack +++ b/debian/scripts/koha-plack @@ -99,11 +99,11 @@ start_plack() if [ "$DEV_INSTALL" = "1" ]; then # Maybe we should switch off debug_mode if DEV_INSTALL is not set? - environment="development" + if [ -z $deployment_environment ]; then environment="development"; fi fi if [ "$debug_mode" = "yes" ]; then - environment="development" + if [ -z $deployment_environment ]; then environment="development"; fi daemonize="" logging="" # remote debugger takes care max_requests_and_workers="--workers 1" @@ -465,6 +465,9 @@ while [ $# -gt 0 ]; do --debugger-path) debugger_path="$2" shift 2 ;; + -dep|--deployment_environment) + deployment_environment=1 + shift ;; -*) die "Error: invalid option switch ($1)" ;; *) -- 2.30.2