mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-04 16:05:59 +00:00
Homarr: bind Redis to localhost only (#13552)
* Homarr: bind Redis to localhost only * 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. * Fix whitespace in homarr install script Clean up minor whitespace issues in install/homarr-install.sh: remove an extra space before the here-path in the Redis config append (>>/etc/redis/redis.conf) and strip a trailing space after the nginx service name in the systemctl disable call. These are whitespace-only edits to keep the script tidy and avoid passing unintended whitespace to commands.
This commit is contained in:
committed by
GitHub
parent
82cc074b05
commit
2707295eba
@@ -65,6 +65,7 @@ EOF
|
|||||||
|
|
||||||
msg_info "Updating Homarr"
|
msg_info "Updating Homarr"
|
||||||
cp /opt/homarr/redis.conf /etc/redis/redis.conf
|
cp /opt/homarr/redis.conf /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
|
rm /etc/nginx/nginx.conf
|
||||||
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
|
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
|
||||||
msg_ok "Updated Homarr"
|
msg_ok "Updated Homarr"
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ mkdir -p /appdata/redis
|
|||||||
chown -R redis:redis /appdata/redis
|
chown -R redis:redis /appdata/redis
|
||||||
chmod 744 /appdata/redis
|
chmod 744 /appdata/redis
|
||||||
cp /opt/homarr/redis.conf /etc/redis/redis.conf
|
cp /opt/homarr/redis.conf /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
|
rm /etc/nginx/nginx.conf
|
||||||
mkdir -p /etc/nginx/templates
|
mkdir -p /etc/nginx/templates
|
||||||
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
|
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user