Don't falsely report that the group was not deleted (#9835)
The message "Group ${groupname} was not automatically removed, you might have to remove it manually" was displayed even if the group had already been deleted before the invocation of the `portable_del_group` method. I added the missing return statements to fix this.
Michalis Macheras committed
Aug 28, 2020 at 06:05 UTC
1d03fbe2a67f90830042accdab0bb6652d4ceeb4
1 file changed
+2
-1
packaging/installer/netdata-uninstaller.sh
+2
-1
@@ -187,7 +187,7 @@ portable_del_group() {
187
run groupdel "${groupname}" && return 0
188
else
189
echo >&2 "Group ${groupname} already removed in a previous step."
190
- run_ok
190
+ return 0
191
fi
192
fi
193
@@ -197,6 +197,7 @@ portable_del_group() {
197
run dseditgroup -o delete "${groupname}" && return 0
198
else
199
echo >&2 "Could not find group ${groupname}, nothing to do"
200
+ return 0
201
fi
202
fi
203