mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1101 from YunoHost/fix-dyndns-key-nobackup
[fix] Add Dyndns domains keys to backup
This commit is contained in:
commit
8790d51b8c
2 changed files with 21 additions and 0 deletions
11
data/hooks/backup/42-conf_ynh_dyndns
Normal file
11
data/hooks/backup/42-conf_ynh_dyndns
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
ynh_abort_if_errors
|
||||
YNH_CWD="${YNH_BACKUP_DIR%/}/conf/ynh/dyndns"
|
||||
mkdir -p $YNH_CWD
|
||||
cd "$YNH_CWD"
|
||||
|
||||
# Backup the configuration
|
||||
ynh_backup --src_path="/etc/yunohost/dyndns" --not_mandatory
|
||||
ynh_backup --src_path="/etc/cron.d/yunohost-dyndns" --not_mandatory
|
10
data/hooks/restore/42-conf_ynh_dyndns
Normal file
10
data/hooks/restore/42-conf_ynh_dyndns
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
ynh_abort_if_errors
|
||||
YNH_CWD="${YNH_BACKUP_DIR%/}/conf/ynh/dyndns"
|
||||
cd "$YNH_CWD"
|
||||
|
||||
# Restore file if exists
|
||||
ynh_restore_file --origin_path="/etc/yunohost/dyndns" --not_mandatory
|
||||
ynh_restore_file --origin_path="/etc/cron.d/yunohost-dyndns" --not_mandatory
|
Loading…
Add table
Reference in a new issue