mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Use ynh_backup helpers
This commit is contained in:
parent
2c9a668afe
commit
ef9cc98d5e
2 changed files with 6 additions and 13 deletions
|
@ -1,13 +1,8 @@
|
|||
#!/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"
|
||||
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,11 +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
|
||||
chmod 600 /etc/dkim/*.mail.txt
|
||||
chmod 400 /etc/dkim/*.mail.key
|
||||
|
|
Loading…
Add table
Reference in a new issue