summaryrefslogtreecommitdiffstats
path: root/contrib/debian/netdata.postinst.in
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-03-06 10:27:26 +1000
committerGitHub <noreply@github.com>2020-03-06 10:27:26 +1000
commitbb884f02ff1977b3e044b5482ba652dbca29a9d6 (patch)
treeafb84ccbd581056c0696c6201947ef4e33101a78 /contrib/debian/netdata.postinst.in
parentf6ee467617f595495ead635605e5c6a21e0b3000 (diff)
Fix missing folders in `/var/` (#8314)
This commit creates the following folders during the installation of Debian packages: - /var/log/netdata - /var/cache/netdata - /var/run/netdata During the purge of the package, these folders are removed if empty. Note that the permissions of `/var/log/netdata` allow the members of the `adm` group to read the content. Fixes #8173
Diffstat (limited to 'contrib/debian/netdata.postinst.in')
-rw-r--r--contrib/debian/netdata.postinst.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/debian/netdata.postinst.in b/contrib/debian/netdata.postinst.in
index 602f21c722..b3e1635804 100644
--- a/contrib/debian/netdata.postinst.in
+++ b/contrib/debian/netdata.postinst.in
@@ -38,6 +38,14 @@ case "$1" in
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
+
fi
dpkg-statoverride --update --add --force root netdata 0775 /var/lib/netdata/registry