Merge pull request #1101 from YunoHost/fix-dyndns-key-nobackup

[fix] Add Dyndns domains keys to backup
This commit is contained in:
Alexandre Aubin 2020-12-10 14:11:09 +01:00 committed by GitHub
commit 8790d51b8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View 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

View 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