Merge pull request #1098 from YunoHost/fix-backup

[fix] Backup/restore dkim keys
This commit is contained in:
Alexandre Aubin 2020-12-08 14:15:51 +01:00 committed by GitHub
commit 555f0e3c65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#!/bin/bash
# Exit hook on subcommand error or unset variable
set -eu
# Source YNH helpers
source /usr/share/yunohost/helpers
# Backup destination
backup_dir="${1}/etc/dkim"
# Backup the configuration
ynh_backup "/etc/dkim" "$backup_dir"

View file

@ -0,0 +1,5 @@
#!/bin/bash
backup_dir="$1/etc/dkim"
cp -a $backup_dir/. /etc/dkim