Lines 60-65
$scriptname -h|--help
Link Here
|
60 |
--debugger-location Specify the host:port for your debugger tool (defaults |
60 |
--debugger-location Specify the host:port for your debugger tool (defaults |
61 |
to localhost:9000) |
61 |
to localhost:9000) |
62 |
--debugger-path Specify the path for the debugger library |
62 |
--debugger-path Specify the path for the debugger library |
|
|
63 |
--hot-reload Enable hot-reload (only in koha-testing-docker) |
63 |
--quiet|-q Make the script quiet about non existent instance names |
64 |
--quiet|-q Make the script quiet about non existent instance names |
64 |
(useful for calling from another scripts). |
65 |
(useful for calling from another scripts). |
65 |
--help|-h Display this help message |
66 |
--help|-h Display this help message |
Lines 95-100
start_plack()
Link Here
|
95 |
logging="--access-log /var/log/koha/${instancename}/plack.log \ |
96 |
logging="--access-log /var/log/koha/${instancename}/plack.log \ |
96 |
--error-log /var/log/koha/${instancename}/plack-error.log" |
97 |
--error-log /var/log/koha/${instancename}/plack-error.log" |
97 |
max_requests_and_workers="--max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS}" |
98 |
max_requests_and_workers="--max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS}" |
|
|
99 |
plack_hot_reload="" |
98 |
|
100 |
|
99 |
if [ "$DEV_INSTALL" = "1" ]; then |
101 |
if [ "$DEV_INSTALL" = "1" ]; then |
100 |
# Maybe we should switch off debug_mode if DEV_INSTALL is not set? |
102 |
# Maybe we should switch off debug_mode if DEV_INSTALL is not set? |
Lines 106-117
start_plack()
Link Here
|
106 |
daemonize="" |
108 |
daemonize="" |
107 |
logging="" # remote debugger takes care |
109 |
logging="" # remote debugger takes care |
108 |
max_requests_and_workers="--workers 1" |
110 |
max_requests_and_workers="--workers 1" |
109 |
STARMAN="/usr/bin/perl -d ${STARMAN}" |
111 |
PLACKUP="/usr/bin/perl -d ${PLACKUP}" |
110 |
fi |
112 |
fi |
111 |
|
113 |
|
112 |
STARMANOPTS="-M FindBin ${max_requests_and_workers} \ |
114 |
if [ "$hot_reload" = "yes" ] && [ "$KOHA_INSTANCE" = "kohadev" ] && [ -d "/kohadevbox/koha/Koha" ]; then |
|
|
115 |
plack_hot_reload="-R /kohadevbox/koha/Koha"; |
116 |
daemonize="" |
117 |
fi |
118 |
|
119 |
PLACKUPOPTS="-M FindBin ${max_requests_and_workers} \ |
120 |
-s Starman |
113 |
--user=${instance_user} --group ${instancename}-koha \ |
121 |
--user=${instance_user} --group ${instancename}-koha \ |
114 |
--pid ${PIDFILE} ${daemonize} ${logging} \ |
122 |
--pid ${PIDFILE} ${daemonize} ${logging} ${plack_hot_reload}\ |
115 |
-E ${environment} --socket ${PLACKSOCKET} ${PSGIFILE}" |
123 |
-E ${environment} --socket ${PLACKSOCKET} ${PSGIFILE}" |
116 |
|
124 |
|
117 |
if ! is_plack_running ${instancename}; then |
125 |
if ! is_plack_running ${instancename}; then |
Lines 123-129
start_plack()
Link Here
|
123 |
current_dir=$(pwd) |
131 |
current_dir=$(pwd) |
124 |
eval cd ~$instance_user |
132 |
eval cd ~$instance_user |
125 |
|
133 |
|
126 |
if ${STARMAN} ${STARMANOPTS}; then |
134 |
if ${PLACKUP} ${PLACKUPOPTS}; then |
127 |
log_end_msg 0 |
135 |
log_end_msg 0 |
128 |
else |
136 |
else |
129 |
log_end_msg 1 |
137 |
log_end_msg 1 |
Lines 398-410
_do_instance() {
Link Here
|
398 |
esac |
406 |
esac |
399 |
} |
407 |
} |
400 |
|
408 |
|
401 |
STARMAN=$(which starman) |
409 |
PLACKUP=$(which plackup) |
402 |
op="" |
410 |
op="" |
403 |
quiet="no" |
411 |
quiet="no" |
404 |
debug_mode="no" |
412 |
debug_mode="no" |
405 |
debugger_key="" |
413 |
debugger_key="" |
406 |
debugger_location="localhost:9000" |
414 |
debugger_location="localhost:9000" |
407 |
debugger_path="" |
415 |
debugger_path="" |
|
|
416 |
hot_reload="" |
408 |
|
417 |
|
409 |
# Read command line parameters |
418 |
# Read command line parameters |
410 |
while [ $# -gt 0 ]; do |
419 |
while [ $# -gt 0 ]; do |
Lines 445-450
while [ $# -gt 0 ]; do
Link Here
|
445 |
--debugger-path) |
454 |
--debugger-path) |
446 |
debugger_path="$2" |
455 |
debugger_path="$2" |
447 |
shift 2 ;; |
456 |
shift 2 ;; |
|
|
457 |
--hot-reload) |
458 |
hot_reload="yes" |
459 |
shift ;; |
448 |
-*) |
460 |
-*) |
449 |
die "Error: invalid option switch ($1)" ;; |
461 |
die "Error: invalid option switch ($1)" ;; |
450 |
*) |
462 |
*) |
451 |
- |
|
|