Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
The mentioned syntax error was in this simple command. SC1009

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