From 8d345748fef2f0e791084c796c8353a11611f581 Mon Sep 17 00:00:00 2001 From: drivebyer Date: Tue, 5 Dec 2023 15:37:12 +0800 Subject: [PATCH] fix shell --- arm64/images/ot-redis/entrypoint.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arm64/images/ot-redis/entrypoint.sh b/arm64/images/ot-redis/entrypoint.sh index 0a74b8972..ead4e2fc7 100644 --- a/arm64/images/ot-redis/entrypoint.sh +++ b/arm64/images/ot-redis/entrypoint.sh @@ -45,7 +45,7 @@ redis_mode_setup() { fi local nodePortConf=$(grep "$(hostname)" "${EXTERNAL_CONFIG_FILE}") if [[ -z "${nodePortConf}" ]]; then - echo "No nodeport config found for ${hostname}" + echo "No nodeport config found for $(hostname)" sed -i -e "/myself/ s/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/${POD_IP}/" "${DATA_DIR}/nodes.conf" fi else @@ -79,13 +79,13 @@ external_config() { # 3. cluster-announce-bus-port local nodePortConf=$(grep "$(hostname)" "${EXTERNAL_CONFIG_FILE}") if [[ -z "${nodePortConf}" ]]; then - echo "No nodeport config found for ${hostname}" + echo "No nodeport config found for $(hostname)" echo "include ${EXTERNAL_CONFIG_FILE}" >> /etc/redis/redis.conf else - echo "Found nodeport config for ${hostname}" - local ip=$(echo "${line}" | awk '{print $2}') - local port=$(echo "${line}" | awk '{print $3}') - local bus_port=$(echo "${line}" | awk '{print $4}') + echo "Found nodeport config for $(hostname)" + local ip=$(echo "${nodePortConf}" | awk '{print $2}') + local port=$(echo "${nodePortConf}" | awk '{print $3}') + local bus_port=$(echo "${nodePortConf}" | awk '{print $4}') echo "cluster-announce-ip ${ip}" >> /etc/redis/redis.conf echo "cluster-announce-port ${port}" >> /etc/redis/redis.conf echo "cluster-announce-bus-port ${bus_port}" >> /etc/redis/redis.conf