From: Frank Brehm Date: Mon, 31 Oct 2022 15:02:49 +0000 (+0100) Subject: Changing output in scripts/chatbot-to-ldap X-Git-Tag: 0.6.1~1^2~1 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=b8f82431b532dcdbcf98f1bb888e7a91b32da2f3;p=pixelpark%2Fpp-admin-tools.git Changing output in scripts/chatbot-to-ldap --- diff --git a/scripts/chatbot-to-ldap b/scripts/chatbot-to-ldap index 8510aaf..e75b14b 100755 --- a/scripts/chatbot-to-ldap +++ b/scripts/chatbot-to-ldap @@ -85,13 +85,13 @@ else fi echo +echo "Handing home directories of existing users ..." for old_account in "${!ACCOUNTS_MIGRATE[@]}" ; do new_account="${ACCOUNTS_MIGRATE[${old_account}]}" old_home="/home/${old_account}" new_home="/home/${new_account}" if [[ -d "${old_home}" ]] ; then - echo "Handling '${old_home}' => '${new_home}' ..." CUR_OWNER=$( stat --format "%U" "${old_home}" ) if [[ "${CUR_OWNER}" != "${new_account}" ]] ; then echo "Chowning \"${old_home}\" to user \"${new_account}\": ..." @@ -103,6 +103,7 @@ for old_account in "${!ACCOUNTS_MIGRATE[@]}" ; do fi fi if [[ "${old_account}" != "${new_account}" ]] ; then + echo "Moving '${old_home}' => '${new_home}' ..." if [[ -d "${new_home}" ]] ; then echo "Cannot move '${old_home}' => '${new_home}', because the target dir is already existing." else @@ -113,6 +114,7 @@ for old_account in "${!ACCOUNTS_MIGRATE[@]}" ; do done echo +echo "Removing home directories of non-existing users ..." for old_account in "${ACCOUNTS_REMOVE[@]}" ; do old_home="/home/${old_account}" @@ -130,3 +132,5 @@ for old_account in "${ACCOUNTS_REMOVE[@]}" ; do fi done +echo +echo "Finished."