From be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 04:57:58 +0200 Subject: Adding upstream version 1.44.3. Signed-off-by: Daniel Baumann --- contrib/debian/netdata.postinst | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 contrib/debian/netdata.postinst (limited to 'contrib/debian/netdata.postinst') diff --git a/contrib/debian/netdata.postinst b/contrib/debian/netdata.postinst new file mode 100644 index 00000000..1da46cc8 --- /dev/null +++ b/contrib/debian/netdata.postinst @@ -0,0 +1,55 @@ +#!/bin/sh + +set -e + +dpkg-maintscript-helper dir_to_symlink \ + /var/lib/netdata/www/.well-known /usr/share/netdata/www/.well-known 1.18.1~ netdata -- "$@" +dpkg-maintscript-helper dir_to_symlink \ + /var/lib/netdata/www/css /usr/share/netdata/www/css 1.18.1~ netdata -- "$@" +dpkg-maintscript-helper dir_to_symlink \ + /var/lib/netdata/www/fonts /usr/share/netdata/www/fonts 1.18.1~ netdata -- "$@" +dpkg-maintscript-helper dir_to_symlink \ + /var/lib/netdata/www/images /usr/share/netdata/www/images 1.18.1~ netdata -- "$@" +dpkg-maintscript-helper dir_to_symlink \ + /var/lib/netdata/www/lib /usr/share/netdata/www/lib 1.18.1~ netdata -- "$@" +dpkg-maintscript-helper dir_to_symlink \ + /var/lib/netdata/www/static /usr/share/netdata/www/static 1.18.1~ netdata -- "$@" + +case "$1" in + configure|reconfigure) + 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/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/cache/netdata > /dev/null 2>&1; then + dpkg-statoverride --update --add netdata netdata 0755 /var/cache/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 + + grep /usr/libexec/netdata /var/lib/dpkg/info/netdata.list | xargs -n 30 chown root:netdata + + chmod 4750 /usr/libexec/netdata/plugins.d/cgroup-network + chmod 4750 /usr/libexec/netdata/plugins.d/local-listeners + + # Workaround for other plugins not installed directly by this package + chmod -f 4750 /usr/libexec/netdata/plugins.d/ioping || true + + ;; +esac + +#DEBHELPER# + +exit 0 -- cgit v1.2.3