yunohost/data/hooks/backup/40-conf_ynh_currenthost
2016-05-30 09:17:25 +02:00

13 lines
282 B
Bash
Executable file

#!/bin/bash
# Exit hook on subcommand error or unset variable
set -eu
# Source YNH helpers
. /usr/share/yunohost/helpers.d/filesystem
# Backup destination
backup_dir="${1}/conf/ynh"
# Backup the configuration
ynh_backup "/etc/yunohost/current_host" "${backup_dir}/current_host"