From f50e3e4e97cd72e3fcad3772b109d0c2abf796c2 Mon Sep 17 00:00:00 2001 From: osetrovich <osetrovich@users.noreply.github.com> Date: Fri, 26 Jul 2019 15:57:45 +0500 Subject: [PATCH] Updated files and folders removal. --- debian/postrm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/postrm b/debian/postrm index 4aac40b53..f5ba274ea 100755 --- a/debian/postrm +++ b/debian/postrm @@ -3,5 +3,13 @@ if [ "$1" == "purge" ] && [ -e /usr/share/debconf/confmodule ] ; then . /usr/share/debconf/confmodule db_purge fi -usermod -G $(groups $(id -nu) | sed 's/kelvin//') +GROUP_RM="kelvin" + +systemctl stop kelvin-node +systemctl disable kelvin-node + +for username in (cat /etc/passwd | grep "/home" | cut -d ':' -f1); do + gpasswd -d $username $GROUP_RM +done +rm -r /opt/kelvin-node groupdel kelvin -- GitLab