fix(homarr): make Redis bind directive idempotent

Replace unconditional append with grep guard to prevent duplicate
'bind 127.0.0.1 -::1' entries on repeated updates.
This commit is contained in:
CanbiZ (MickLesk)
2026-04-10 09:11:20 +02:00
parent 29c2b26e31
commit 7029eeb5c5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ EOF
msg_info "Updating Homarr"
cp /opt/homarr/redis.conf /etc/redis/redis.conf
echo "bind 127.0.0.1 -::1" >> /etc/redis/redis.conf
grep -q '^bind 127.0.0.1 -::1$' /etc/redis/redis.conf || echo "bind 127.0.0.1 -::1" >> /etc/redis/redis.conf
rm /etc/nginx/nginx.conf
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
msg_ok "Updated Homarr"