From 39b571f3d11559873025affdd3c5b7d3430e5de1 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Fri, 28 Jun 2024 10:05:56 +0200 Subject: [PATCH] Support redict --- templates/scriptreceiver/bashrc.erb.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/scriptreceiver/bashrc.erb.sh b/templates/scriptreceiver/bashrc.erb.sh index 77c21b7..fbf4e18 100644 --- a/templates/scriptreceiver/bashrc.erb.sh +++ b/templates/scriptreceiver/bashrc.erb.sh @@ -83,7 +83,11 @@ alias la='ls -A' alias l='ls -CF' if [[ $(hostname) =~ redis ]]; then - alias redis-cli="redis-cli -a $(grep requirepass /opt/redis/node-0/server.conf | awk '{print $2}' | sed 's/"//g') --no-auth-warning" + if [ -f /opt/redis/node-0/server.conf ]; then + alias redis-cli="redis-cli -a $(grep requirepass /opt/redis/node-0/server.conf | awk '{print $2}' | sed 's/"//g') --no-auth-warning" + else + alias redis-cli="redis-cli -a $(grep requirepass /opt/redict/node-0/server.conf | awk '{print $2}' | sed 's/"//g') --no-auth-warning" + fi fi # Alias definitions.