diff --git a/duplicati/create.homedir.sh b/duplicati/create.homedir.sh index a6cb487..dd04ff6 100755 --- a/duplicati/create.homedir.sh +++ b/duplicati/create.homedir.sh @@ -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 + } # }}}