mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
ncp-templates: Fix erroneous outputs messing up config files
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
7225c2c898
commit
ea75a97a91
@ -5,16 +5,16 @@ source /usr/local/etc/library.sh
|
|||||||
|
|
||||||
if [[ "$1" == "--defaults" ]]
|
if [[ "$1" == "--defaults" ]]
|
||||||
then
|
then
|
||||||
echo -e "INFO: Restoring template to default settings"
|
echo "INFO: Restoring template to default settings" >&2
|
||||||
DB_DIR=/var/lib/mysql
|
DB_DIR=/var/lib/mysql
|
||||||
else
|
else
|
||||||
if [[ "$DOCKERBUILD" -eq 1 ]]
|
if [[ "$DOCKERBUILD" -eq 1 ]]
|
||||||
then
|
then
|
||||||
echo -e "INFO: Docker build detected."
|
echo "INFO: Docker build detected." >&2
|
||||||
DB_DIR=/data-ro/database
|
DB_DIR=/data-ro/database
|
||||||
elif is_docker
|
elif is_docker
|
||||||
then
|
then
|
||||||
echo -e "INFO: Docker container detected."
|
echo "INFO: Docker container detected." >&2
|
||||||
DB_DIR=/data/database
|
DB_DIR=/data/database
|
||||||
else
|
else
|
||||||
DB_DIR="$(source "${BINDIR}/CONFIG/nc-database.sh"; tmpl_db_dir)"
|
DB_DIR="$(source "${BINDIR}/CONFIG/nc-database.sh"; tmpl_db_dir)"
|
||||||
|
|||||||
@ -5,7 +5,7 @@ source /usr/local/etc/library.sh
|
|||||||
|
|
||||||
if [[ "$1" == "--defaults" ]]
|
if [[ "$1" == "--defaults" ]]
|
||||||
then
|
then
|
||||||
echo -e "INFO: Restoring template to default settings"
|
echo "INFO: Restoring template to default settings" >&2
|
||||||
INNODB_BUFFER_POOL_SIZE=256M
|
INNODB_BUFFER_POOL_SIZE=256M
|
||||||
else
|
else
|
||||||
INNODB_BUFFER_POOL_SIZE="$(source "${BINDIR}/CONFIG/nc-limits.sh"; tmpl_innodb_buffer_pool_size)"
|
INNODB_BUFFER_POOL_SIZE="$(source "${BINDIR}/CONFIG/nc-limits.sh"; tmpl_innodb_buffer_pool_size)"
|
||||||
|
|||||||
@ -54,7 +54,7 @@ EOF
|
|||||||
is_docker || {
|
is_docker || {
|
||||||
|
|
||||||
DATADIR=$( get_nc_config_value datadirectory ) || {
|
DATADIR=$( get_nc_config_value datadirectory ) || {
|
||||||
echo -e "ERROR: Could not get data directory. Is NextCloud running?";
|
echo "ERROR: Could not get data directory. Is NextCloud running?" >&2
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
NC_SNAPSHOTS_DIR="$(dirname "$DATADIR")/ncp-snapshots"
|
NC_SNAPSHOTS_DIR="$(dirname "$DATADIR")/ncp-snapshots"
|
||||||
|
|||||||
@ -140,6 +140,6 @@ cat <<EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
if ! [[ -f /.ncp-image ]]; then
|
if ! [[ -f /.ncp-image ]]; then
|
||||||
echo -e "Apache self check:"
|
echo "Apache self check:" >&2
|
||||||
apache2ctl -t 1>&2
|
apache2ctl -t 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -7,7 +7,7 @@ PHPVER="${PHPVER?ERROR: PHPVER variable unset!}"
|
|||||||
|
|
||||||
if [[ "$1" == "--defaults" ]] || ! [[ -f "${BINDIR}/CONFIG/nc-datadir.sh" ]]
|
if [[ "$1" == "--defaults" ]] || ! [[ -f "${BINDIR}/CONFIG/nc-datadir.sh" ]]
|
||||||
then
|
then
|
||||||
echo -e "INFO: Restoring template to default settings"
|
echo "INFO: Restoring template to default settings" >&2
|
||||||
|
|
||||||
TMP_DIR="/tmp"
|
TMP_DIR="/tmp"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -7,7 +7,7 @@ PHPVER="${PHPVER?ERROR: PHPVER variable unset!}"
|
|||||||
|
|
||||||
if [[ "$1" == "--defaults" ]] || ! [[ -f "${BINDIR}/CONFIG/nc-datadir.sh" ]]
|
if [[ "$1" == "--defaults" ]] || ! [[ -f "${BINDIR}/CONFIG/nc-datadir.sh" ]]
|
||||||
then
|
then
|
||||||
echo -e "INFO: Restoring template to default settings"
|
echo "INFO: Restoring template to default settings" >&2
|
||||||
|
|
||||||
PHPTHREADS=6
|
PHPTHREADS=6
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user