mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-09 14:42: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" ]]
|
||||
then
|
||||
echo -e "INFO: Restoring template to default settings"
|
||||
echo "INFO: Restoring template to default settings" >&2
|
||||
DB_DIR=/var/lib/mysql
|
||||
else
|
||||
if [[ "$DOCKERBUILD" -eq 1 ]]
|
||||
then
|
||||
echo -e "INFO: Docker build detected."
|
||||
echo "INFO: Docker build detected." >&2
|
||||
DB_DIR=/data-ro/database
|
||||
elif is_docker
|
||||
then
|
||||
echo -e "INFO: Docker container detected."
|
||||
echo "INFO: Docker container detected." >&2
|
||||
DB_DIR=/data/database
|
||||
else
|
||||
DB_DIR="$(source "${BINDIR}/CONFIG/nc-database.sh"; tmpl_db_dir)"
|
||||
|
||||
@ -5,7 +5,7 @@ source /usr/local/etc/library.sh
|
||||
|
||||
if [[ "$1" == "--defaults" ]]
|
||||
then
|
||||
echo -e "INFO: Restoring template to default settings"
|
||||
echo "INFO: Restoring template to default settings" >&2
|
||||
INNODB_BUFFER_POOL_SIZE=256M
|
||||
else
|
||||
INNODB_BUFFER_POOL_SIZE="$(source "${BINDIR}/CONFIG/nc-limits.sh"; tmpl_innodb_buffer_pool_size)"
|
||||
|
||||
@ -54,7 +54,7 @@ EOF
|
||||
is_docker || {
|
||||
|
||||
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;
|
||||
}
|
||||
NC_SNAPSHOTS_DIR="$(dirname "$DATADIR")/ncp-snapshots"
|
||||
|
||||
@ -140,6 +140,6 @@ cat <<EOF
|
||||
EOF
|
||||
|
||||
if ! [[ -f /.ncp-image ]]; then
|
||||
echo -e "Apache self check:"
|
||||
echo "Apache self check:" >&2
|
||||
apache2ctl -t 1>&2
|
||||
fi
|
||||
|
||||
@ -7,7 +7,7 @@ PHPVER="${PHPVER?ERROR: PHPVER variable unset!}"
|
||||
|
||||
if [[ "$1" == "--defaults" ]] || ! [[ -f "${BINDIR}/CONFIG/nc-datadir.sh" ]]
|
||||
then
|
||||
echo -e "INFO: Restoring template to default settings"
|
||||
echo "INFO: Restoring template to default settings" >&2
|
||||
|
||||
TMP_DIR="/tmp"
|
||||
else
|
||||
|
||||
@ -7,7 +7,7 @@ PHPVER="${PHPVER?ERROR: PHPVER variable unset!}"
|
||||
|
||||
if [[ "$1" == "--defaults" ]] || ! [[ -f "${BINDIR}/CONFIG/nc-datadir.sh" ]]
|
||||
then
|
||||
echo -e "INFO: Restoring template to default settings"
|
||||
echo "INFO: Restoring template to default settings" >&2
|
||||
|
||||
PHPTHREADS=6
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user