From d6a713208ae11c77c2123524e9ec8071965912ac Mon Sep 17 00:00:00 2001 From: Tobias Date: Mon, 8 Dec 2025 23:04:16 +0100 Subject: [PATCH] redis readwrite fix --- ct/homarr.sh | 5 +++++ install/homarr-install.sh | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ct/homarr.sh b/ct/homarr.sh index 0e3e3d7ce..77b176331 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -45,6 +45,11 @@ function update_script() { sed -i 's|^EnvironmentFile=.*|EnvironmentFile=-/opt/homarr.env|' /etc/systemd/system/homarr.service chown -R redis:redis /appdata/redis chmod 755 /appdata/redis + mkdir -p /etc/systemd/system/redis-server.service.d/ + cat > /etc/systemd/system/redis-server.service.d/override.conf << 'EOF' +[Service] +ReadWritePaths=-/appdata/redis -/var/lib/redis -/var/log/redis -/var/run/redis -/etc/redis +EOF # TODO: change in json systemctl daemon-reload cp /opt/homarr/.env /opt/homarr.env diff --git a/install/homarr-install.sh b/install/homarr-install.sh index dfa28738b..ac281d7cd 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -59,6 +59,11 @@ chmod +x /usr/bin/homarr msg_ok "Copied config files" msg_info "Creating Services" +mkdir -p /etc/systemd/system/redis-server.service.d/ +cat > /etc/systemd/system/redis-server.service.d/override.conf << 'EOF' +[Service] +ReadWritePaths=-/appdata/redis -/var/lib/redis -/var/log/redis -/var/run/redis -/etc/redis +EOF cat </etc/systemd/system/homarr.service [Unit] Description=Homarr Service @@ -74,6 +79,7 @@ ExecStart=/opt/homarr/run.sh WantedBy=multi-user.target EOF chmod +x /opt/homarr/run.sh +systemctl daemon-reload systemctl enable -q --now redis-server && sleep 5 systemctl enable -q --now homarr msg_ok "Created Services"