Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-16 01:16:25 +0300
committerthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-16 01:16:25 +0300
commit7225c2c8986efb3a162513f4c9ddf5dd3e76084e (patch)
tree818b52e749259263c9f8d2ccc27e2a400a8d05a2 /etc/ncp-templates
parent4737b56d71da2057f20da92576ec716863d50154 (diff)
nc-limits.sh: Migrate installation of www.conf to ncp template
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
Diffstat (limited to 'etc/ncp-templates')
-rw-r--r--etc/ncp-templates/php/pool.d.www.conf.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/etc/ncp-templates/php/pool.d.www.conf.sh b/etc/ncp-templates/php/pool.d.www.conf.sh
new file mode 100644
index 00000000..50a65abb
--- /dev/null
+++ b/etc/ncp-templates/php/pool.d.www.conf.sh
@@ -0,0 +1,32 @@
+#! /bin/bash
+
+set -e
+source /usr/local/etc/library.sh
+
+PHPVER="${PHPVER?ERROR: PHPVER variable unset!}"
+
+if [[ "$1" == "--defaults" ]] || ! [[ -f "${BINDIR}/CONFIG/nc-datadir.sh" ]]
+then
+ echo -e "INFO: Restoring template to default settings"
+
+ PHPTHREADS=6
+else
+ PHPTHREADS="$(source "${BINDIR}/CONFIG/nc-limits.sh"; tmpl_php_threads)"
+fi
+
+
+cat <<EOF
+[www]
+user = www-data
+group = www-data
+listen = /run/php/php7.4-fpm.sock
+listen.owner = www-data
+listen.group = www-data
+pm = static
+pm.max_children = ${PHPTHREADS}
+pm.start_servers = 4
+pm.min_spare_servers = 4
+pm.max_spare_servers = 8
+pm.status_path = /status
+slowlog = log/\$pool.log.slow
+EOF