From cd05ce7943820f7c14cdf82b1a9209f37e7f7d53 Mon Sep 17 00:00:00 2001 From: Tony Lee Date: Wed, 14 Jun 2023 17:43:30 +0800 Subject: [PATCH] add disabled option Signed-off-by: Tony Lee --- .../debian-11/rootfs/opt/bitnami/scripts/libredis.sh | 10 +++++++--- .../debian-11/rootfs/opt/bitnami/scripts/libredis.sh | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/bitnami/redis-cluster/6.2/debian-11/rootfs/opt/bitnami/scripts/libredis.sh b/bitnami/redis-cluster/6.2/debian-11/rootfs/opt/bitnami/scripts/libredis.sh index b7d456efac06c..c9e8511d8618e 100644 --- a/bitnami/redis-cluster/6.2/debian-11/rootfs/opt/bitnami/scripts/libredis.sh +++ b/bitnami/redis-cluster/6.2/debian-11/rootfs/opt/bitnami/scripts/libredis.sh @@ -407,9 +407,13 @@ redis_configure_default() { #The value stored in $i here is the number of seconds and times of save rules in redis rdb mode if [ ! -z "${REDIS_RDB_POLICY}" ];then - for i in ${REDIS_RDB_POLICY};do - redis_conf_set save "${i//#/ }" - done + if [ "${REDIS_RDB_POLICY}" == "disabled" ]; then + redis_conf_set save "" + else + for i in ${REDIS_RDB_POLICY};do + redis_conf_set save "${i//#/ }" + done + fi fi redis_conf_set port "$REDIS_PORT_NUMBER" diff --git a/bitnami/redis-cluster/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh b/bitnami/redis-cluster/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh index b7d456efac06c..c9e8511d8618e 100644 --- a/bitnami/redis-cluster/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh +++ b/bitnami/redis-cluster/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh @@ -407,9 +407,13 @@ redis_configure_default() { #The value stored in $i here is the number of seconds and times of save rules in redis rdb mode if [ ! -z "${REDIS_RDB_POLICY}" ];then - for i in ${REDIS_RDB_POLICY};do - redis_conf_set save "${i//#/ }" - done + if [ "${REDIS_RDB_POLICY}" == "disabled" ]; then + redis_conf_set save "" + else + for i in ${REDIS_RDB_POLICY};do + redis_conf_set save "${i//#/ }" + done + fi fi redis_conf_set port "$REDIS_PORT_NUMBER"