[pmg-devel] [PATCH pmg-api v2 5/9] postinstall: add new user for shared functionality
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed May 29 16:12:59 CEST 2024
A shared group named 'pmg' is introduced for processes that need to be
accessible from multiple processes like spamassassin, rrdcached or the
mail queue at /var/spool/pmg.
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
debian/postinst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/debian/postinst b/debian/postinst
index 3bc77bb..781b5dc 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -49,6 +49,17 @@ migrate_apt_auth_conf() {
}
migrate_pmg_smtp_filter() {
+ PMG_GROUP="pmg"
+
+ # Add shared pmg group for shared functionality, e.g. rrdcached
+ if ! getent group | grep -q "^$PMG_GROUP:" ; then
+ echo -n "Adding group $PMG_GROUP.."
+ addgroup --quiet --system $PMG_GROUP 2>/dev/null ||true
+ echo "..done"
+ fi
+
+ chown :pmg /var/lib/pmg
+
pmgdb update >/dev/null 2>&1 &
}
--
2.39.2
More information about the pmg-devel
mailing list