-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Ordering for userdel/groupdel is crucial - fixed copy n paste errors
- Loading branch information
Showing
3 changed files
with
16 additions
and
11 deletions.
There are no files selected for viewing
15 changes: 8 additions & 7 deletions
15
src/main/resources/com/typesafe/sbt/packager/rpm/postuninstall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
# Adding system user/group : ${{daemon_user}} and ${{daemon_group}} | ||
if ! getent group | grep -q "^${{daemon_group}}:" ; | ||
# Removing system user/group : ${{daemon_user}} and ${{daemon_group}} | ||
echo "Try deleting system user and group [${{daemon_user}}:${{daemon_group}}]" | ||
if getent passwd | grep -q "^${{daemon_user}}:"; | ||
then | ||
echo "Deleting system user: ${{daemon_user}}" | ||
userdel ${{daemon_user}} | ||
fi | ||
if getent group | grep -q "^${{daemon_group}}:" ; | ||
then | ||
echo "Deleting system group: ${{daemon_group}}" | ||
groupdel ${{daemon_group}} | ||
fi | ||
if ! getent passwd | grep -q "^${{daemon_user}}:"; | ||
then | ||
echo "Deleting system user: ${{daemon_user}}" | ||
userdel ${{daemon_user}} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters