Rename file list for next run

This commit is contained in:
Jeremy Gardais 2021-11-29 12:01:38 +01:00
parent 6dc5cd590d
commit 2cc9078ad9
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 0 deletions

View File

@ -144,6 +144,7 @@ define_vars() { # {{{
## Temp file vars {{{
readonly ldap_user_list_path="/tmp/${PROGNAME}.ldap.user.list"
readonly ldap_previous_user_list_path="/tmp/.${PROGNAME}.previous.ldap.user.list"
## }}}
}
# }}}
@ -316,6 +317,11 @@ main() { # {{{
for all members of ${RED}${ldap_group_cn},${ldap_group_base}${COLOR_DEBUG} LDAP group \
from ${RED}${ldap_server}${COLOR_DEBUG} LDAP server ."
## Rename user list for next run of the script
## AND exit
mv --force -- "${ldap_user_list_path}" "${ldap_previous_user_list_path}" \
&& exit 0
}
# }}}