mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
fix shellcheck
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
44d491cc5b
commit
b08a06573d
4 changed files with 12 additions and 8 deletions
|
|
@ -19,6 +19,7 @@ if ! [ -w "$DUMP_DIR" ]; then
|
|||
fi
|
||||
|
||||
# Test if some things match
|
||||
# shellcheck disable=SC2235
|
||||
if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSION")" ] ) \
|
||||
|| ( ! [ -f "$DATADIR/PG_VERSION" ] && [ -f "$DUMP_FILE" ] ); then
|
||||
# The DUMP_file must be provided
|
||||
|
|
@ -41,7 +42,7 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
|
|||
set -e
|
||||
|
||||
# Remove old database files
|
||||
rm -rf "$DATADIR/"*
|
||||
rm -rf "${DATADIR:?}/"*
|
||||
|
||||
# Change database port to a random port temporarily
|
||||
export PGPORT=11000
|
||||
|
|
@ -69,7 +70,7 @@ fi
|
|||
# Cover the last case
|
||||
if ! [ -f "$DATADIR/PG_VERSION" ] && ! [ -f "$DUMP_FILE" ]; then
|
||||
# Remove old database files if somehow there should be some
|
||||
rm -rf "$DATADIR/"*
|
||||
rm -rf "${DATADIR:?}/"*
|
||||
fi
|
||||
|
||||
# Catch docker stop attempts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue