diff options
-rw-r--r-- | debian/netdata.postinst.in | 11 | ||||
-rw-r--r-- | debian/netdata.postrm | 8 |
2 files changed, 4 insertions, 15 deletions
diff --git a/debian/netdata.postinst.in b/debian/netdata.postinst.in index 90aa33c1..1d656e48 100644 --- a/debian/netdata.postinst.in +++ b/debian/netdata.postinst.in @@ -10,15 +10,7 @@ case "$1" in 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 root netdata 0755 /var/lib/netdata - fi - - if ! dpkg-statoverride --list /usr/share/netdata/web >/dev/null 2>&1; then - dpkg-statoverride --update --add root netdata 0755 /usr/share/netdata/web + adduser --quiet --system --ingroup netdata --home /var/run/netdata --no-create-home netdata fi if ! dpkg-statoverride --list /var/cache/netdata >/dev/null 2>&1; then @@ -27,7 +19,6 @@ case "$1" in fi - chown -R root:netdata /usr/share/netdata/web chown -R root:netdata /usr/lib/@DEB_HOST_MULTIARCH@/netdata/plugins.d setcap cap_dac_read_search,cap_sys_ptrace+ep /usr/lib/@DEB_HOST_MULTIARCH@/netdata/plugins.d/apps.plugin chown netdata:adm /var/log/netdata diff --git a/debian/netdata.postrm b/debian/netdata.postrm index d45bb0ad..5df19783 100644 --- a/debian/netdata.postrm +++ b/debian/netdata.postrm @@ -7,11 +7,9 @@ case "$1" in ;; purge) - for dir_name in /var/cache/netdata /var/lib/netdata /usr/share/netdata/web; do - if dpkg-statoverride --list | grep -qw "$dir_name"; then - dpkg-statoverride --remove "$dir_name" - fi - done + if dpkg-statoverride --list | grep -qw "/var/cache/netdata"; then + dpkg-statoverride --remove "$dir_name" + fi rm -rf /var/cache/netdata /var/log/netdata if getent passwd netdata >/dev/null; then |