mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-22 14:24:07 -07:00
Update v-import-cpanel-backup
This commit is contained in:
parent
1884463e8e
commit
d4411dc92f
1 changed files with 1 additions and 1 deletions
|
@ -275,7 +275,7 @@ if [[ "$sk_maild" != "cur" && "$sk_maild" != "new" && "$sk_maild" != "tmp" ]];
|
||||||
echo "Set password for ${sk_mail_account}@${sk_maild}"
|
echo "Set password for ${sk_mail_account}@${sk_maild}"
|
||||||
pass=$(grep "^${sk_mail_account}:" ${sk_importer_in}/homedir/etc/${sk_maild}/shadow | awk -F ":" '{print $2}')
|
pass=$(grep "^${sk_mail_account}:" ${sk_importer_in}/homedir/etc/${sk_maild}/shadow | awk -F ":" '{print $2}')
|
||||||
newline="${sk_mail_account}:{SHA512-CRYPT}$pass:${sk_cp_user}:mail::/home/${sk_cp_user}:0"
|
newline="${sk_mail_account}:{SHA512-CRYPT}$pass:${sk_cp_user}:mail::/home/${sk_cp_user}:0"
|
||||||
echo $newline
|
# echo $newline
|
||||||
escaped=$(printf '%s\n' "$newline" | sed -e 's/[\/&]/\\&/g')
|
escaped=$(printf '%s\n' "$newline" | sed -e 's/[\/&]/\\&/g')
|
||||||
sed -i "s/^${sk_mail_account}:.*/$escaped/g" /home/${sk_cp_user}/conf/mail/${sk_maild}/passwd
|
sed -i "s/^${sk_mail_account}:.*/$escaped/g" /home/${sk_cp_user}/conf/mail/${sk_maild}/passwd
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue