mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-09 14:42:01 -03:30
* Update nextcloud to 24.0.4 * ncp-update-nc: Upgrade php to version 8.1 when installing NC >= 24 * ncp-update-nc: Use /etc/shadow workaround for installing systemd * ncp-update-nc: Run nc-limits after php upgrade * ncp-update-nc: Rollback after failed php upgrade * ncp-update-nc: Add success message * ncp-update-nc: Prevent installation of NC >= 24 on debian 10/PHP <= 7.3 * lamp.sh: Install php8.1 from sury.org * lamp.sh: Use /etc/shadow workaround for installing systemd * Dockerfile: Install wget, ca-certificates, lsb-release and procps before installing lamp.sh * Dockerfile: Make sure, ncp-templates are available when installing lamp.sh * Migrate all scripts to use template for writing opcache.ini and get_nc_config_value for retrieving datadir * nc-nextcloud.sh Fix crash if nc-datadir has not been installed yet * opcache.ini.sh: Don't try to get tmpl values from nc-datadir in containers
29 lines
556 B
Bash
29 lines
556 B
Bash
#! /bin/bash
|
|
|
|
set -e
|
|
source /usr/local/etc/library.sh
|
|
|
|
if [[ "$1" == "--defaults" ]]
|
|
then
|
|
echo -e "INFO: Restoring template to default settings"
|
|
DB_DIR=/var/lib/mysql
|
|
else
|
|
if [[ "$DOCKERBUILD" -eq 1 ]]
|
|
then
|
|
echo -e "INFO: Docker build detected."
|
|
DB_DIR=/data-ro/database
|
|
elif is_docker
|
|
then
|
|
echo -e "INFO: Docker container detected."
|
|
DB_DIR=/data/database
|
|
else
|
|
DB_DIR="$(source "${BINDIR}/CONFIG/nc-database.sh"; tmpl_db_dir)"
|
|
fi
|
|
fi
|
|
|
|
# configure MariaDB (UTF8 4 byte support)
|
|
cat <<EOF
|
|
[mysqld]
|
|
datadir = ${DB_DIR?}
|
|
EOF
|