mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1098 from YunoHost/fix-backup
[fix] Backup/restore dkim keys
This commit is contained in:
commit
555f0e3c65
2 changed files with 18 additions and 0 deletions
13
data/hooks/backup/22-conf_mail
Normal file
13
data/hooks/backup/22-conf_mail
Normal 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"
|
5
data/hooks/restore/22-conf_mail
Normal file
5
data/hooks/restore/22-conf_mail
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
backup_dir="$1/etc/dkim"
|
||||
|
||||
cp -a $backup_dir/. /etc/dkim
|
Loading…
Add table
Reference in a new issue