From 64d817fe60787752a0d41a7225fe1e3e6eba90e9 Mon Sep 17 00:00:00 2001 From: ZhuoQinghui <1302344380@qq.com> Date: Thu, 3 Mar 2022 14:14:53 +0800 Subject: [PATCH] redis.sh --- Docker/run/redis.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Docker/run/redis.sh b/Docker/run/redis.sh index 32cf2af..1227533 100644 --- a/Docker/run/redis.sh +++ b/Docker/run/redis.sh @@ -20,20 +20,15 @@ mkdir -p /opt/docker-run/redis/conf echo "创建Redis配置文件" touch /opt/docker-run/redis/conf/redis.conf +echo "清空旧配置" +cat /dev/null > /opt/docker-run/redis/conf/redis.conf +echo "写入新配置" cat <> /opt/docker-run/redis/conf/redis.conf - -bind \$host +bind $host daemonize NO protected-mode no requirepass $password - EOF -#tee /opt/docker-run/redis/conf/redis.conf <<-'EOF' -#bind \$host -#daemonize NO -#protected-mode no -#requirepass \$password -#EOF echo "拉取镜像" docker pull redis:latest