From f2c61d616f0babc2f55fc2e4d26ecb6ff6853611 Mon Sep 17 00:00:00 2001 From: Christos Alexiou Date: Thu, 8 Aug 2024 15:54:34 +0300 Subject: [PATCH 1/3] feat: only use requirepass if password's set --- hosting/single/runner.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hosting/single/runner.sh b/hosting/single/runner.sh index fc8d4d8b2d..5029128ff2 100644 --- a/hosting/single/runner.sh +++ b/hosting/single/runner.sh @@ -80,7 +80,11 @@ ln -s ${DATA_DIR}/.env /worker/.env # make these directories in runner, incase of mount mkdir -p ${DATA_DIR}/minio chown -R couchdb:couchdb ${DATA_DIR}/couch -redis-server --requirepass $REDIS_PASSWORD > /dev/stdout 2>&1 & +if [[ -z "${REDIS_PASSWORD}" ]]; then + redis-server --requirepass $REDIS_PASSWORD > /dev/stdout 2>&1 & +else + redis-server > /dev/stdout 2>&1 & +fi /bbcouch-runner.sh & # only start minio if use s3 isn't passed From 691803e90ab3ffced6c22f87bcd367d93d15ec9d Mon Sep 17 00:00:00 2001 From: Christos Alexiou Date: Thu, 8 Aug 2024 15:56:28 +0300 Subject: [PATCH 2/3] Check empty --- hosting/single/runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/single/runner.sh b/hosting/single/runner.sh index 5029128ff2..190e303ee7 100644 --- a/hosting/single/runner.sh +++ b/hosting/single/runner.sh @@ -80,7 +80,7 @@ ln -s ${DATA_DIR}/.env /worker/.env # make these directories in runner, incase of mount mkdir -p ${DATA_DIR}/minio chown -R couchdb:couchdb ${DATA_DIR}/couch -if [[ -z "${REDIS_PASSWORD}" ]]; then +if [[ -z "${REDIS_PASSWORD}" || "${REDIS_PASSWORD}" = "" ]]; then redis-server --requirepass $REDIS_PASSWORD > /dev/stdout 2>&1 & else redis-server > /dev/stdout 2>&1 & From 200dc4027d4f196400a6d6b77ddb868bbcf2ee32 Mon Sep 17 00:00:00 2001 From: Christos Alexiou Date: Thu, 8 Aug 2024 16:10:55 +0300 Subject: [PATCH 3/3] Use -n for non-empty --- hosting/single/runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/single/runner.sh b/hosting/single/runner.sh index 190e303ee7..b89bf8ffd4 100644 --- a/hosting/single/runner.sh +++ b/hosting/single/runner.sh @@ -80,7 +80,7 @@ ln -s ${DATA_DIR}/.env /worker/.env # make these directories in runner, incase of mount mkdir -p ${DATA_DIR}/minio chown -R couchdb:couchdb ${DATA_DIR}/couch -if [[ -z "${REDIS_PASSWORD}" || "${REDIS_PASSWORD}" = "" ]]; then +if [[ -n "${REDIS_PASSWORD}" ]]; then redis-server --requirepass $REDIS_PASSWORD > /dev/stdout 2>&1 & else redis-server > /dev/stdout 2>&1 &