Example script to increase webclient threads (#426)

Signed-off-by: Hakan Tandogan <hakan@tandogan.com>
pull/428/head
Hakan Tandogan 2023-08-21 22:19:02 +02:00 committed by GitHub
parent 3b332f99d2
commit 9c477f9270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
#!/bin/bash -ex
[ -z ${MIN_SHARED} ] && MIN_SHARED=20
[ -z ${MAX_SHARED} ] && MAX_SHARED=80
[ -z ${MIN_CUSTOM} ] && MIN_CUSTOM=20
[ -z ${MAX_CUSTOM} ] && MAX_CUSTOM=40
sed -i \
"s/\org.openhab.webclient:minThreadsShared\s*=.*/org.openhab.webclient:minThreadsShared = ${MIN_SHARED}/g" \
"${OPENHAB_CONF}/services/runtime.cfg"
sed -i \
"s/\org.openhab.webclient:maxThreadsShared\s*=.*/org.openhab.webclient:maxThreadsShared = ${MAX_SHARED}/g" \
"${OPENHAB_CONF}/services/runtime.cfg"
sed -i \
"s/\org.openhab.webclient:minThreadsCustom\s*=.*/org.openhab.webclient:minThreadsCustom = ${MIN_CUSTOM}/g" \
"${OPENHAB_CONF}/services/runtime.cfg"
sed -i \
"s/\org.openhab.webclient:maxThreadsCustom\s*=.*/org.openhab.webclient:maxThreadsCustom = ${MAX_CUSTOM}/g" \
"${OPENHAB_CONF}/services/runtime.cfg"