mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
Merge branch 'devel' of github.com:nextcloud/nextcloudpi into devel
This commit is contained in:
commit
16aa6c8055
@ -42,10 +42,13 @@ tmpl_php_max_filesize() {
|
||||
}
|
||||
|
||||
tmpl_php_threads() {
|
||||
local TOTAL_MEM="$( get_total_mem )"
|
||||
local PHPTHREADS="$(find_app_param nc-limits PHPTHREADS)"
|
||||
[[ $PHPTHREADS -eq 0 ]] && PHPTHREADS=$(nproc)
|
||||
[[ $PHPTHREADS -lt 6 ]] && PHPTHREADS=6
|
||||
echo -n "$PHPTHREADS"
|
||||
# By default restricted by memory / 100MB
|
||||
[[ $PHPTHREADS -eq 0 ]] && PHPTHREADS=$(( TOTAL_MEM / ( 100 * 1024 * 1024 ) ))
|
||||
# Minimum 16
|
||||
[[ $PHPTHREADS -lt 16 ]] && PHPTHREADS=16
|
||||
echo -n "$PHPTHREADS"
|
||||
}
|
||||
|
||||
configure()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"id": "nc-limits",
|
||||
"name": "Nc-limits",
|
||||
"title": "nc-limits",
|
||||
"description": "Configure system limits for NextCloudPi",
|
||||
"description": "Configure system limits for NextcloudPi",
|
||||
"info": "Examples: 200M or 2G. Write 0 for autoconfig",
|
||||
"infotitle": "",
|
||||
"params": [
|
||||
|
||||
@ -9,7 +9,7 @@ if [[ "$1" == "--defaults" ]] || ! [[ -f "${BINDIR}/CONFIG/nc-limits.sh" ]]
|
||||
then
|
||||
echo "INFO: Restoring template to default settings" >&2
|
||||
|
||||
PHPTHREADS=6
|
||||
PHPTHREADS=16
|
||||
else
|
||||
PHPTHREADS="$(source "${BINDIR}/CONFIG/nc-limits.sh"; tmpl_php_threads)"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user