mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
nextcloud: wait for redis to start
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
ab939dac26
commit
54dc5387a7
2 changed files with 8 additions and 0 deletions
|
|
@ -19,6 +19,13 @@ run_upgrade_if_needed_due_to_app_update() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Only start container if redis is accessible
|
||||||
|
# shellcheck disable=SC2153
|
||||||
|
while ! nc -z "$REDIS_HOST" "6379"; do
|
||||||
|
echo "Waiting for redis to start..."
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
# Check permissions in ncdata
|
# Check permissions in ncdata
|
||||||
touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null
|
touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null
|
||||||
if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then
|
if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ if [ "$(sysctl -n vm.overcommit_memory)" != "1" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run redis with a password if provided
|
# Run redis with a password if provided
|
||||||
|
echo "Redis has started"
|
||||||
if [ -n "$REDIS_HOST_PASSWORD" ]; then
|
if [ -n "$REDIS_HOST_PASSWORD" ]; then
|
||||||
exec redis-server --requirepass "$REDIS_HOST_PASSWORD" --loglevel warning
|
exec redis-server --requirepass "$REDIS_HOST_PASSWORD" --loglevel warning
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue