Skip to content

Commit

Permalink
update CPU cores during first setup + fix SC (#2468)
Browse files Browse the repository at this point in the history
  • Loading branch information
enoch85 authored Apr 2, 2023
1 parent 6185098 commit fc88cc8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/imaginary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ install_if_not ffmpeg
if which nproc >/dev/null 2>&1
then
nextcloud_occ config:system:set preview_concurrency_new --value="$(nproc)"
nextcloud_occ config:system:set preview_concurrency_all --value="$(expr $(nproc) '*' 2)"
nextcloud_occ config:system:set preview_concurrency_all --value="$(($(nproc)*2))""
else
nextcloud_occ config:system:set preview_concurrency_new --value="2"
nextcloud_occ config:system:set preview_concurrency_all --value="4"
Expand Down
11 changes: 11 additions & 0 deletions nextcloud-startup-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ It will also do the following:
- Set correct Rewriterules for Nextcloud
- Copy content from .htaccess to .user.ini (because we use php-fpm)
- Add additional options if you choose them
- Set correct CPU cores for Imaginary
- And more..."

msg_box "PLEASE NOTE:
Expand Down Expand Up @@ -480,6 +481,16 @@ else
calculate_php_fpm
fi

# Set correct amount of CPUs for Imaginary
if which nproc >/dev/null 2>&1
then
nextcloud_occ config:system:set preview_concurrency_new --value="$(nproc)"
nextcloud_occ config:system:set preview_concurrency_all --value="$(($(nproc)*2))"
else
nextcloud_occ config:system:set preview_concurrency_new --value="2"
nextcloud_occ config:system:set preview_concurrency_all --value="4"
fi

# Add temporary fix if needed
if network_ok
then
Expand Down

0 comments on commit fc88cc8

Please sign in to comment.