Skip to content

Commit

Permalink
add disabled option
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Lee <dogzzdogzz@gmail.com>
  • Loading branch information
dogzzdogzz committed Jun 14, 2023
1 parent 067c6d6 commit cd05ce7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cd05ce7

Please sign in to comment.