diff --git a/data/hooks/backup/22-conf_mail b/data/hooks/backup/22-conf_mail new file mode 100644 index 000000000..018a345d9 --- /dev/null +++ b/data/hooks/backup/22-conf_mail @@ -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" diff --git a/data/hooks/restore/22-conf_mail b/data/hooks/restore/22-conf_mail new file mode 100644 index 000000000..c069b53db --- /dev/null +++ b/data/hooks/restore/22-conf_mail @@ -0,0 +1,5 @@ +#!/bin/bash + +backup_dir="$1/etc/dkim" + +cp -a $backup_dir/. /etc/dkim