mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1100 from YunoHost/fix-backup
[fix] Unix permission on dkim
This commit is contained in:
commit
736ba4e7b5
2 changed files with 11 additions and 11 deletions
|
@ -1,13 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit hook on subcommand error or unset variable
|
||||
set -eu
|
||||
|
||||
# Source YNH helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
ynh_abort_if_errors
|
||||
YNH_CWD="${YNH_BACKUP_DIR%/}/conf/dkim"
|
||||
mkdir -p "$YNH_CWD"
|
||||
cd "$YNH_CWD"
|
||||
|
||||
# Backup destination
|
||||
backup_dir="${1}/etc/dkim"
|
||||
|
||||
# Backup the configuration
|
||||
ynh_backup "/etc/dkim" "$backup_dir"
|
||||
ynh_backup --src_path="/etc/dkim"
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
backup_dir="$1/etc/dkim"
|
||||
backup_dir="$1/conf/dkim"
|
||||
|
||||
cp -a $backup_dir/. /etc/dkim
|
||||
cp -a $backup_dir/etc/dkim/. /etc/dkim
|
||||
|
||||
chown -R root:root /etc/dkim
|
||||
chown _rspamd:root /etc/dkim
|
||||
chown _rspamd:root /etc/dkim/*.mail.key
|
||||
|
|
Loading…
Add table
Reference in a new issue