Don't remove groups/users in Debian postrm (#7817)

This commit is contained in:
James Mills 2020-01-24 12:39:36 +10:00 committed by GitHub
parent c53e772b97
commit 25f93c8354
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 40 deletions

View File

@ -1,4 +1,4 @@
#! /bin/sh
#!/bin/sh
set -e
@ -16,8 +16,7 @@ dpkg-maintscript-helper dir_to_symlink \
/var/lib/netdata/www/static /usr/share/netdata/www/static 1.18.1~ netdata -- "$@"
case "$1" in
remove)
;;
remove) ;;
purge)
if dpkg-statoverride --list | grep -qw /var/cache/netdata; then
@ -35,26 +34,10 @@ case "$1" in
if dpkg-statoverride --list | grep -qw /var/lib/netdata; then
dpkg-statoverride --remove /var/lib/netdata
fi
if getent passwd netdata >/dev/null; then
if [ -x /usr/sbin/deluser ]; then
deluser --quiet --system netdata || echo "Unable to remove netdata user"
fi
fi
if getent group netdata >/dev/null; then
if [ -x /usr/sbin/delgroup ]; then
delgroup --quiet --system netdata || echo "Unable to remove netdata group"
fi
fi
;;
*)
;;
*) ;;
esac
#DEBHELPER#
exit 0