]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Changed output
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 21 Feb 2023 16:37:17 +0000 (17:37 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 21 Feb 2023 16:37:17 +0000 (17:37 +0100)
scripts/set-ldap-inetuserstatus

index 7e852c9ffc3c4c861202939d2c176e1f3908a433..6881a6aa859b2f923abf94ce9b13a0de12c9b327 100755 (executable)
@@ -81,6 +81,9 @@ USER_MAIL=
 USER_NAME=
 REQUESTED_STATUS=
 
+UPDATED_USERS=0
+KEPT_USERS=0
+
 #------------------------------------------------------------------------------
 draw_line() {
     if [[ "${QUIET}" == "y" ]] ; then
@@ -404,6 +407,7 @@ setting_user_status() {
     fi
     if [[ "${req_user_status}" == "${cur_user_status}" ]] ; then
         info "Entry '${CYAN}${USER_DN}${NORMAL}' has already the inetUserStatus '${CYAN}${REQUESTED_STATUS}${NORMAL}'."
+        KEPT_USERS=$(( KEPT_USERS + 1 ))
         return
     fi
 
@@ -427,6 +431,7 @@ setting_user_status() {
     if [[ "${SIMULATE}" != "y" ]] ; then
         eval $cmd
     fi
+    UPDATED_USERS=$(( UPDATED_USERS + 1 ))
     debug "Done."
 
 }
@@ -491,6 +496,8 @@ main() {
         done
     done
 
+    empty_line
+    info "Updated ${UPDATED_USERS} users, ${KEPT_USERS} not changed."
     empty_line
     info "Finished."