From 2be911d369a3e824a2fb3e5a2cebf8a97dbdd472 Mon Sep 17 00:00:00 2001 From: ljf Date: Tue, 8 Dec 2020 12:17:59 +0100 Subject: [PATCH] [fix] Missing backup conf --- data/hooks/backup/22-conf_mail | 13 +++++++++++++ data/hooks/restore/22-conf_mail | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 data/hooks/backup/22-conf_mail create mode 100644 data/hooks/restore/22-conf_mail 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