aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinit-sh/grpuser.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/init-sh/grpuser.sh b/init-sh/grpuser.sh
index 3493100..7186ff5 100755
--- a/init-sh/grpuser.sh
+++ b/init-sh/grpuser.sh
@@ -104,8 +104,11 @@ RefreshAdd() {
else
echo "Adding user \"${user_name}\" to group \"${group_name}\"."
IsGroupExisting;
- AppendUserToGroup;
- ModifyFile;
+ IsUserAlreadyInGroup;
+ if [[ $? == 1 ]]; then
+ AppendUserToGroup;
+ ModifyFile;
+ fi
fi
done
fi