Re-add the certificate backup/restore hook ...

This commit is contained in:
Alexandre Aubin 2021-04-05 17:47:56 +02:00
parent 956e860ff7
commit 9f599fee4c
2 changed files with 20 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}/conf/ynh/certs"
# Backup certificates
ynh_backup "/etc/yunohost/certs" "$backup_dir"

View file

@ -0,0 +1,7 @@
backup_dir="$1/conf/ynh/certs"
mkdir -p /etc/yunohost/certs/
cp -a $backup_dir/. /etc/yunohost/certs/
service nginx reload
service metronome reload