mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-21 10:50:10 +00:00
allow to adjust the log level globally (redis)
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
redis-cli -a "$REDIS_HOST_PASSWORD" PING || exit 1
|
redis-cli -a "$REDIS_HOST_PASSWORD" PING || exit 1
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
|
||||||
|
REDIS_LOG_LEVEL="warning"
|
||||||
|
else
|
||||||
|
REDIS_LOG_LEVEL="$AIO_LOG_LEVEL"
|
||||||
|
fi
|
||||||
|
export REDIS_LOG_LEVEL
|
||||||
|
|
||||||
# Show wiki if vm.overcommit is disabled
|
# Show wiki if vm.overcommit is disabled
|
||||||
if [ "$(sysctl -n vm.overcommit_memory)" != "1" ]; then
|
if [ "$(sysctl -n vm.overcommit_memory)" != "1" ]; then
|
||||||
echo "Memory overcommit is disabled but necessary for safe operation"
|
echo "Memory overcommit is disabled but necessary for safe operation"
|
||||||
@@ -16,7 +27,7 @@ fi
|
|||||||
|
|
||||||
# Build the redis-server argument list.
|
# Build the redis-server argument list.
|
||||||
REDIS_ARGS=(
|
REDIS_ARGS=(
|
||||||
--loglevel warning
|
--loglevel "$REDIS_LOG_LEVEL"
|
||||||
--save "" # Disable RDB persistence (Redis is used as a pure cache/lock store)
|
--save "" # Disable RDB persistence (Redis is used as a pure cache/lock store)
|
||||||
--maxmemory-policy allkeys-lru # Evict least-recently-used keys when memory is full
|
--maxmemory-policy allkeys-lru # Evict least-recently-used keys when memory is full
|
||||||
--lazyfree-lazy-eviction yes # Perform evictions in a background thread
|
--lazyfree-lazy-eviction yes # Perform evictions in a background thread
|
||||||
|
|||||||
Reference in New Issue
Block a user