mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Re-add the certificate backup/restore hook ...
This commit is contained in:
parent
956e860ff7
commit
9f599fee4c
2 changed files with 20 additions and 0 deletions
13
data/hooks/backup/21-conf_ynh_certs
Normal file
13
data/hooks/backup/21-conf_ynh_certs
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}/conf/ynh/certs"
|
||||
|
||||
# Backup certificates
|
||||
ynh_backup "/etc/yunohost/certs" "$backup_dir"
|
7
data/hooks/restore/21-conf_ynh_certs
Normal file
7
data/hooks/restore/21-conf_ynh_certs
Normal 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
|
Loading…
Add table
Reference in a new issue