Skip to content

Commit

Permalink
fix shell
Browse files Browse the repository at this point in the history
  • Loading branch information
drivebyer committed Dec 5, 2023
1 parent fb04bc1 commit 8d34574
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arm64/images/ot-redis/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8d34574

Please sign in to comment.