From e375afe2fbe106dc510ab459781ea025a75f3b5d Mon Sep 17 00:00:00 2001 From: Luca Miccini Date: Thu, 15 Sep 2022 07:23:09 +0200 Subject: [PATCH] Fix config file path in redis healtcheck script With I56767cb42a3cbe73242dddad2e6c00876e6ac448 we adapted THT to use the new default path /etc/redis/redis.conf for the redis config file. This commit adjusts the healtcheck script to cope with such change. Change-Id: I309d8fa1f2c19c21ec1633f3d3ea37fcb8019275 --- healthcheck/redis | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/healthcheck/redis b/healthcheck/redis index df0f30bfb..160094456 100755 --- a/healthcheck/redis +++ b/healthcheck/redis @@ -1,18 +1,18 @@ #!/bin/bash -if parse_out=$(cat "/etc/redis.conf" | egrep "^bind +.*$"); then +if parse_out=$(cat "/etc/redis/redis.conf" | egrep "^bind +.*$"); then redis_host=$(echo -n $parse_out | awk '{print $2}') else redis_host=127.0.0.1 fi -if parse_out=$(cat "/etc/redis.conf" | egrep "^port +.*$"); then +if parse_out=$(cat "/etc/redis/redis.conf" | egrep "^port +.*$"); then redis_port=$(echo -n $parse_out | awk '{print $2}') else redis_port=6379 fi -if parse_out=$(cat "/etc/redis.conf" | egrep "^requirepass +.*$"); then +if parse_out=$(cat "/etc/redis/redis.conf" | egrep "^requirepass +.*$"); then redis_pass=$(echo -n $parse_out | awk '{print $2}') result=$(printf "*2\r\n\$4\r\nAUTH\r\n\$${#redis_pass}\r\n${redis_pass}\r\n*1\r\n\$4\r\nPING\r\n" | socat - TCP:$redis_host:$redis_port) else