[pmg-devel] [PATCH pmg-api v3 06/10] postinstall: make rrdcached be readable by the pmg group

Maximiliano Sandoval m.sandoval at proxmox.com
Mon Jun 17 16:18:03 CEST 2024


Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 debian/postinst | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/postinst b/debian/postinst
index ebae645..f139e55 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -53,6 +53,14 @@ migrate_pmg_smtp_filter() {
 
     chown :pmg /var/lib/pmg
 
+    # FIXME: This is not ideal
+    if ! cat /etc/default/rrdcached | grep -q "^SOCKGROUP=pmg$"; then
+        sed -i "s/#SOCKGROUP=root/SOCKGROUP=pmg/" /etc/default/rrdcached
+        if systemctl --quiet is-active rrdcached.service ; then
+            deb-systemd-invoke reload-or-try-restart rrdcached.service >/dev/null || true
+        fi
+    fi
+
     pmgdb update >/dev/null 2>&1 &
 }
 
-- 
2.39.2





More information about the pmg-devel mailing list