mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
Fix for DKIM key permission after restoring backup
This commit is contained in:
parent
073c0164f1
commit
7815539e91
1 changed files with 12 additions and 0 deletions
|
@ -517,6 +517,13 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
|
|||
domains=$(echo "$backup_domains" |egrep -f $tmpdir/selected.txt)
|
||||
fi
|
||||
|
||||
# Checking exim username for later chowning
|
||||
exim_user="exim";
|
||||
check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd)
|
||||
if [ "$check_exim_username" -eq 1 ]; then
|
||||
exim_user="Debian-exim"
|
||||
fi
|
||||
|
||||
# Restoring dns domain
|
||||
for domain in $domains; do
|
||||
echo -e "$(date "+%F %T") $domain" |tee -a $tmpdir/restore.log
|
||||
|
@ -579,6 +586,11 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
|
|||
-exec chown -h $user:mail {} \;
|
||||
fi
|
||||
fi
|
||||
|
||||
# Chowning mail conf files to exim user
|
||||
find $HOMEDIR/$user/conf/mail/$domain_idn -user root \
|
||||
-exec chown $exim_user {} \;
|
||||
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue