View | Details | Raw Unified | Return to bug 39740
Collapse All | Expand All

(-)a/debian/scripts/koha-plack (-10 / +10 lines)
Lines 92-105 start_plack() Link Here
92
92
93
    instance_user="${instancename}-koha"
93
    instance_user="${instancename}-koha"
94
94
95
    if [ -z "$development_environment" ]; then environment="deployment"; else environment="development"; fi
95
    if is_test_system ${instancename} || [ -n "$development_environment" ]; then
96
        environment="development"
97
    else
98
        environment="deployment"
99
    fi
96
    daemonize="--daemonize"
100
    daemonize="--daemonize"
97
    logging="--access-log /var/log/koha/${instancename}/plack.log \
101
    logging="--access-log /var/log/koha/${instancename}/plack.log \
98
             --error-log /var/log/koha/${instancename}/plack-error.log"
102
             --error-log /var/log/koha/${instancename}/plack-error.log"
99
    max_requests_and_workers="--max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS}"
103
    max_requests_and_workers="--max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS}"
100
104
101
    if [ "$debug_mode" = "yes" ]; then
105
    # Enable debug mode in development
102
        # Maybe we should switch off debug_mode if GIT_INSTALL is not set?
106
    if [ "$debug_mode" = "yes" ] && [ "$environment" = "development" ]; then
103
        daemonize=""
107
        daemonize=""
104
        logging="" # remote debugger takes care
108
        logging="" # remote debugger takes care
105
        max_requests_and_workers="--workers 1"
109
        max_requests_and_workers="--workers 1"
Lines 363-374 set_action() Link Here
363
367
364
_do_instance() {
368
_do_instance() {
365
    local name=$1
369
    local name=$1
366
    local PERL5LIB=$PERL5LIB
367
    local KOHA_HOME=$KOHA_HOME
368
    local GIT_INSTALL=$GIT_INSTALL
369
370
370
    adjust_paths_git_install $name
371
    adjust_paths_git_install $name
371
    PERL5LIB=$PERL5LIB:$KOHA_HOME/installer:$KOHA_HOME/lib/installer
372
    PERL5LIB=$PERL5LIB:$KOHA_HOME/installer:$KOHA_HOME/lib/installer
373
    if [ "$KOHA_BINDIR" = "misc" ]; then GIT_INSTALL=1; else GIT_INSTALL=""; fi
374
    export PERL5LIB KOHA_HOME GIT_INSTALL
375
372
    # If debug mode is enabled, add the debugger lib path
376
    # If debug mode is enabled, add the debugger lib path
373
    # to PERL5LIB if appropriate
377
    # to PERL5LIB if appropriate
374
    #FIXME: many of these variables should be set in a higher scope
378
    #FIXME: many of these variables should be set in a higher scope
Lines 475-484 done Link Here
475
479
476
[ "${quiet}" != "yes" ] && check_env_and_warn
480
[ "${quiet}" != "yes" ] && check_env_and_warn
477
481
478
export PERL5LIB
479
export GIT_INSTALL
480
export KOHA_HOME
481
482
if [ $# -gt 0 ]; then
482
if [ $# -gt 0 ]; then
483
    # We have at least one instance name
483
    # We have at least one instance name
484
    for name in "$@"; do
484
    for name in "$@"; do
(-)a/debian/scripts/koha-z3950-responder (-14 / +9 lines)
Lines 86-100 start_z3950() Link Here
86
    logging="-l /var/log/koha/${instancename}/z3950.log"
86
    logging="-l /var/log/koha/${instancename}/z3950.log"
87
87
88
    Z3950RESPONDER="/usr/bin/perl $KOHA_HOME/$KOHA_BINDIR/z3950_responder.pl"
88
    Z3950RESPONDER="/usr/bin/perl $KOHA_HOME/$KOHA_BINDIR/z3950_responder.pl"
89
    if [ "$debug_mode" = "yes" ]; then
89
    if [ "$debug_mode" = "yes" ] && is_test_system $instancename; then
90
        if [ "$GIT_INSTALL" = "1" ]; then
90
        environment="development"
91
            warn "Not a dev install, disabling debug mode"
91
        daemonize=""
92
        else
92
        logging="" # remote debugger takes care
93
            environment="development"
93
        Z3950RESPONDER="/usr/bin/perl -d $KOHA_HOME/$KOHA_BINDIR/z3950_responder.pl"
94
            daemonize=""
94
    elif [ "$debug_mode" = "yes" ]; then
95
            logging="" # remote debugger takes care
95
        warn "Not a test system, disabling debug mode"
96
            Z3950RESPONDER="/usr/bin/perl -d $KOHA_HOME/$KOHA_BINDIR/z3950_responder.pl"
97
        fi
98
    fi
96
    fi
99
97
100
    Z3950OPTS="-c ${CONFIGDIR} \
98
    Z3950OPTS="-c ${CONFIGDIR} \
Lines 297-308 if [ $# -gt 0 ]; then Link Here
297
        if is_instance $name; then
295
        if is_instance $name; then
298
296
299
            adjust_paths_git_install $name
297
            adjust_paths_git_install $name
300
            export GIT_INSTALL
301
            export KOHA_HOME
302
            PERL5LIB=$PERL5LIB:$KOHA_HOME/installer:$KOHA_HOME/lib/installer
298
            PERL5LIB=$PERL5LIB:$KOHA_HOME/installer:$KOHA_HOME/lib/installer
303
            # If debug mode is enabled, add the debugger lib path
299
            # If debug mode is enabled, add the debugger lib path
304
            # to PERL5LIB if appropriate
300
            # to PERL5LIB if appropriate
305
            if [ "$debug_mode" = "yes" ]; then
301
            if [ "$debug_mode" = "yes" ] && is_test_system $name; then
306
                if [ "$debugger_path" != "" ]; then
302
                if [ "$debugger_path" != "" ]; then
307
                    PERL5LIB="${debugger_path}":$PERL5LIB
303
                    PERL5LIB="${debugger_path}":$PERL5LIB
308
                fi
304
                fi
Lines 311-317 if [ $# -gt 0 ]; then Link Here
311
                export DBGP_IDEKEY=${debugger_key}
307
                export DBGP_IDEKEY=${debugger_key}
312
                export PERL5OPT="-d"
308
                export PERL5OPT="-d"
313
            fi
309
            fi
314
            export PERL5LIB
310
            export KOHA_HOME PERL5LIB
315
311
316
            case $op in
312
            case $op in
317
                "start")
313
                "start")
318
- 

Return to bug 39740