From 69c2ea1019e37ce35d4ebecf86d1d55261b0a42e Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 31 Dec 2023 12:42:35 +0100 Subject: [PATCH] use ynh_add_config for Backup_list --- scripts/install | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index f4587a4..43ffe31 100755 --- a/scripts/install +++ b/scripts/install @@ -91,10 +91,6 @@ mkdir -p "$backup_dir" ynh_script_progression --message="Configuring Archivist..." --weight=2 config_file="$final_path/Backup_list.conf" -cp "$final_path/Backup_list.conf.default" "$config_file" - -ynh_replace_string --match_string="^backup_dir=.*" --replace_string="backup_dir=$backup_dir" --target_file="$config_file" -ynh_replace_string --match_string="^enc_backup_dir=.*" --replace_string="enc_backup_dir=$enc_backup_dir" --target_file="$config_file" if [ $encrypt -eq 1 ] then @@ -107,8 +103,7 @@ else encrypt=false passkey=na fi -ynh_replace_string --match_string="^encrypt=.*" --replace_string="encrypt=$encrypt" --target_file="$config_file" -ynh_replace_string --match_string="^cryptpass=.*" --replace_string="cryptpass=$passkey" --target_file="$config_file" + if [ $core_backup -eq 1 ] then @@ -116,7 +111,8 @@ then else core_backup=false fi -ynh_replace_string --match_string="^ynh_core_backup=.*" --replace_string="ynh_core_backup=$core_backup" --target_file="$config_file" + +ynh_add_config --template="Backup_list.conf.default" --destination="$config_file" if [ $apps_backup -eq 1 ] then