Skip to content

Commit

Permalink
unbound.sh | Version 1.0.202405201904
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhijie0327 committed May 20, 2024
1 parent 060d89f commit 12771f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unbound/unbound.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ CUSTOM_REDIS_SERVER_HOST="" # 127.0.0.1
CUSTOM_REDIS_SERVER_PASSWORD=""
CUSTOM_REDIS_SERVER_PATH=""
CUSTOM_REDIS_SERVER_PORT="" # 6379
ENABLE_REDIS_CACHE_CHECK_WHEN_SERVE_EXPIRED="false"
ENABLE_REDIS_CACHE="false"

CREATE_REDIS_INSTANCE="false"
Expand Down Expand Up @@ -231,6 +232,9 @@ function DownloadConfiguration() {
if [ "${CUSTOM_REDIS_SERVER_PORT}" != "" ]; then
sed -i "s/redis-server-port: 6379/redis-server-port: ${CUSTOM_REDIS_SERVER_PORT}/g" "${DOCKER_PATH}/conf/unbound.conf"
fi
if [ "${ENABLE_REDIS_CACHE_CHECK_WHEN_SERVE_EXPIRED}" == "false" ]; then
sed -i "s/cachedb-check-when-serve-expired: yes/cachedb-check-when-serve-expired: no/g" "${DOCKER_PATH}/conf/unbound.conf"
fi
if [ "${ENABLE_REDIS_CACHE}" == "false" ]; then
sed -i "/cachedb:/d;/#-/d;s/cachedb //g" "${DOCKER_PATH}/conf/unbound.conf"
else
Expand Down

0 comments on commit 12771f3

Please sign in to comment.