Lines 74-89
start_plack()
Link Here
|
74 |
|
74 |
|
75 |
_check_and_fix_perms $instancename |
75 |
_check_and_fix_perms $instancename |
76 |
|
76 |
|
77 |
PLACK_MAX_REQUESTS="50" |
77 |
PLACK_MAX_REQUESTS=$(run_safe_xmlstarlet $instancename plack_max_requests) |
78 |
PLACK_WORKERS="2" |
78 |
[ -z $PLACK_MAX_REQUESTS ] && PLACK_MAX_REQUESTS="50" |
79 |
|
79 |
PLACK_WORKERS=$(run_safe_xmlstarlet $instancename plack_workers) |
80 |
if [[ $(get_plack_max_requests $instancename) ]]; then |
80 |
[ -z $PLACK_WORKERS ] && PLACK_WORKERS="2" |
81 |
PLACK_MAX_REQUESTS="$(get_plack_max_requests $instancename)" |
|
|
82 |
fi |
83 |
|
84 |
if [[ $(get_plack_workers $instancename) ]]; then |
85 |
PLACK_WORKERS="$(get_plack_workers $instancename)" |
86 |
fi |
87 |
|
81 |
|
88 |
STARMANOPTS="-M FindBin --max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS} \ |
82 |
STARMANOPTS="-M FindBin --max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS} \ |
89 |
--user=${instancename}-koha --group ${instancename}-koha \ |
83 |
--user=${instancename}-koha --group ${instancename}-koha \ |
Lines 242-271
set_action()
Link Here
|
242 |
fi |
236 |
fi |
243 |
} |
237 |
} |
244 |
|
238 |
|
245 |
adjust_paths() |
|
|
246 |
{ |
247 |
# Optionally use alternative paths for a dev install |
248 |
adjust_paths_dev_install $1 |
249 |
|
250 |
# PERL5LIB has been read from etc/default, add lib/installer |
251 |
# export some vars (for plack.psgi) |
252 |
export KOHA_HOME |
253 |
if [ "$DEV_INSTALL" = "" ]; then |
254 |
export PERL5LIB=$PERL5LIB:$KOHA_HOME/lib/installer |
255 |
else |
256 |
export DEV_INSTALL |
257 |
export PERL5LIB=$PERL5LIB:$KOHA_HOME/installer |
258 |
fi |
259 |
} |
260 |
|
261 |
get_plack_max_requests() { |
262 |
xmlstarlet sel -t -v 'yazgfs/config/plack_max_requests' "/etc/koha/sites/$1/koha-conf.xml" |
263 |
} |
264 |
|
265 |
get_plack_workers() { |
266 |
xmlstarlet sel -t -v 'yazgfs/config/plack_workers' "/etc/koha/sites/$1/koha-conf.xml" |
267 |
} |
268 |
|
269 |
STARMAN=$(which starman) |
239 |
STARMAN=$(which starman) |
270 |
op="" |
240 |
op="" |
271 |
quiet="no" |
241 |
quiet="no" |
Lines 311-317
if [ $# -gt 0 ]; then
Link Here
|
311 |
|
281 |
|
312 |
if is_instance $name; then |
282 |
if is_instance $name; then |
313 |
|
283 |
|
314 |
adjust_paths $name |
284 |
adjust_paths_dev_install $name |
|
|
285 |
export DEV_INSTALL KOHA_HOME PERL5LIB=$PERL5LIB:$KOHA_HOME/installer:$KOHA_HOME/lib/installer |
286 |
|
315 |
case $op in |
287 |
case $op in |
316 |
"start") |
288 |
"start") |
317 |
start_plack $name |
289 |
start_plack $name |
318 |
- |
|
|