Skip to content

Commit fc88cc8

Browse files
authored
update CPU cores during first setup + fix SC (#2468)
1 parent 6185098 commit fc88cc8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

apps/imaginary.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ install_if_not ffmpeg
125125
if which nproc >/dev/null 2>&1
126126
then
127127
nextcloud_occ config:system:set preview_concurrency_new --value="$(nproc)"
128-
nextcloud_occ config:system:set preview_concurrency_all --value="$(expr $(nproc) '*' 2)"
128+
nextcloud_occ config:system:set preview_concurrency_all --value="$(($(nproc)*2))""
129129
else
130130
nextcloud_occ config:system:set preview_concurrency_new --value="2"
131131
nextcloud_occ config:system:set preview_concurrency_all --value="4"

nextcloud-startup-script.sh

+11
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ It will also do the following:
286286
- Set correct Rewriterules for Nextcloud
287287
- Copy content from .htaccess to .user.ini (because we use php-fpm)
288288
- Add additional options if you choose them
289+
- Set correct CPU cores for Imaginary
289290
- And more..."
290291

291292
msg_box "PLEASE NOTE:
@@ -480,6 +481,16 @@ else
480481
calculate_php_fpm
481482
fi
482483

484+
# Set correct amount of CPUs for Imaginary
485+
if which nproc >/dev/null 2>&1
486+
then
487+
nextcloud_occ config:system:set preview_concurrency_new --value="$(nproc)"
488+
nextcloud_occ config:system:set preview_concurrency_all --value="$(($(nproc)*2))"
489+
else
490+
nextcloud_occ config:system:set preview_concurrency_new --value="2"
491+
nextcloud_occ config:system:set preview_concurrency_all --value="4"
492+
fi
493+
483494
# Add temporary fix if needed
484495
if network_ok
485496
then

0 commit comments

Comments
 (0)