diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
commit | 3c315f0fff93aa072472abc10815963ac0035268 (patch) | |
tree | a95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /contrib | |
parent | Adding upstream version 1.35.1. (diff) | |
download | netdata-8ee42cb3e03178db97e68c43291395145b5d548e.tar.xz netdata-8ee42cb3e03178db97e68c43291395145b5d548e.zip |
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/debian/control | 1 | ||||
-rw-r--r-- | contrib/debian/control.xenial | 1 | ||||
-rw-r--r-- | contrib/debian/netdata.postinst | 56 |
3 files changed, 32 insertions, 26 deletions
diff --git a/contrib/debian/control b/contrib/debian/control index ed8a6d58d..c5e5791ff 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -7,7 +7,6 @@ Build-Depends: debhelper (>= 9.20160709), libelf-dev, libuv1-dev, liblz4-dev, - libjudy-dev, libssl-dev, libmnl-dev, libjson-c-dev, diff --git a/contrib/debian/control.xenial b/contrib/debian/control.xenial index 2659c389d..43246d716 100644 --- a/contrib/debian/control.xenial +++ b/contrib/debian/control.xenial @@ -8,7 +8,6 @@ Build-Depends: debhelper (>= 9), libelf-dev, libuv1-dev, liblz4-dev, - libjudy-dev, libssl-dev, libmnl-dev, libjson-c-dev, diff --git a/contrib/debian/netdata.postinst b/contrib/debian/netdata.postinst index a6bd29960..12b1d97b7 100644 --- a/contrib/debian/netdata.postinst +++ b/contrib/debian/netdata.postinst @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh set -e @@ -16,36 +16,39 @@ dpkg-maintscript-helper dir_to_symlink \ /var/lib/netdata/www/static /usr/share/netdata/www/static 1.18.1~ netdata -- "$@" case "$1" in - configure) - if [ -z "$2" ]; then - if ! getent group netdata > /dev/null; then - addgroup --quiet --system netdata - fi + configure|recnfigure) + if ! getent group netdata > /dev/null; then + addgroup --quiet --system netdata + fi - if ! getent passwd netdata > /dev/null; then - adduser --quiet --system --ingroup netdata --home /var/lib/netdata --no-create-home netdata - fi + if ! getent passwd netdata > /dev/null; then + adduser --quiet --system --ingroup netdata --home /var/lib/netdata --no-create-home netdata + fi - if ! dpkg-statoverride --list /var/lib/netdata > /dev/null 2>&1; then - dpkg-statoverride --update --add netdata netdata 0755 /var/lib/netdata + for item in docker nginx varnish haproxy adm nsd proxy squid ceph nobody I2C; do + if getent group $item > /dev/null 2>&1; then + usermod -a -G $item netdata fi + done - if ! dpkg-statoverride --list /var/lib/netdata/www > /dev/null 2>&1; then - dpkg-statoverride --update --add root netdata 0755 /var/lib/netdata/www - fi + if ! dpkg-statoverride --list /var/lib/netdata > /dev/null 2>&1; then + dpkg-statoverride --update --add netdata netdata 0755 /var/lib/netdata + fi - if ! dpkg-statoverride --list /var/cache/netdata > /dev/null 2>&1; then - dpkg-statoverride --update --add netdata netdata 0755 /var/cache/netdata - fi + if ! dpkg-statoverride --list /var/lib/netdata/www > /dev/null 2>&1; then + dpkg-statoverride --update --add root netdata 0755 /var/lib/netdata/www + fi - if ! dpkg-statoverride --list /var/run/netdata > /dev/null 2>&1; then - dpkg-statoverride --update --add netdata netdata 0755 /var/run/netdata - fi + if ! dpkg-statoverride --list /var/cache/netdata > /dev/null 2>&1; then + dpkg-statoverride --update --add netdata netdata 0755 /var/cache/netdata + fi - if ! dpkg-statoverride --list /var/log/netdata > /dev/null 2>&1; then - dpkg-statoverride --update --add netdata adm 02750 /var/log/netdata - fi + if ! dpkg-statoverride --list /var/run/netdata > /dev/null 2>&1; then + dpkg-statoverride --update --add netdata netdata 0755 /var/run/netdata + fi + if ! dpkg-statoverride --list /var/log/netdata > /dev/null 2>&1; then + dpkg-statoverride --update --add netdata adm 02750 /var/log/netdata fi dpkg-statoverride --force --update --add root netdata 0775 /var/lib/netdata/registry > /dev/null 2>&1 @@ -53,7 +56,12 @@ case "$1" in chown -R root:netdata /usr/libexec/netdata/plugins.d setcap cap_dac_read_search,cap_sys_ptrace+ep /usr/libexec/netdata/plugins.d/apps.plugin setcap cap_dac_read_search+ep /usr/libexec/netdata/plugins.d/slabinfo.plugin - capsh --supports=cap_perfmon 2>/dev/null && setcap cap_perfmon+ep /usr/libexec/netdata/plugins.d/perf.plugin || setcap cap_sys_admin+ep /usr/libexec/netdata/plugins.d/perf.plugin + + if capsh --supports=cap_perfmon 2>/dev/null; then + setcap cap_perfmon+ep /usr/libexec/netdata/plugins.d/perf.plugin + else + setcap cap_sys_admin+ep /usr/libexec/netdata/plugins.d/perf.plugin + fi chmod 4750 /usr/libexec/netdata/plugins.d/cgroup-network chmod 4750 /usr/libexec/netdata/plugins.d/nfacct.plugin |