diff options
author | Igor Karpov <iigorkarpov@users.noreply.github.com> | 2022-06-13 15:07:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-13 15:07:51 +0300 |
commit | 4c64b8ea4ff720d946bbb9a11ca7474c5673bb6c (patch) | |
tree | 8d72d3dfadebb880aee96a12f17d19bfaf838ed0 | |
parent | b5dcdbe7e87d0e770d07f3f0a155d1f8d145a91d (diff) |
Add user netdata to secondary group in DEB package (#13109)
* Add user netdata to secondary group
* Update netdata.postinst
-rw-r--r-- | contrib/debian/netdata.postinst | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/debian/netdata.postinst b/contrib/debian/netdata.postinst index a6bd299609..2f61cc72ca 100644 --- a/contrib/debian/netdata.postinst +++ b/contrib/debian/netdata.postinst @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh set -e @@ -26,6 +26,14 @@ case "$1" in adduser --quiet --system --ingroup netdata --home /var/lib/netdata --no-create-home netdata fi + set -- docker nginx varnish haproxy adm nsd proxy squid ceph nobody I2C + for item + do + if getent group $item > /dev/null 2>&1; then + usermod -a -G $item netdata + fi + done + if ! dpkg-statoverride --list /var/lib/netdata > /dev/null 2>&1; then dpkg-statoverride --update --add netdata netdata 0755 /var/lib/netdata fi |