mirror of
https://github.com/YunoHost-Apps/archivist_ynh.git
synced 2024-09-03 18:15:55 +02:00
use ynh_add_config for Backup_list
This commit is contained in:
parent
8437d6ff73
commit
69c2ea1019
1 changed files with 3 additions and 7 deletions
|
@ -91,10 +91,6 @@ mkdir -p "$backup_dir"
|
||||||
ynh_script_progression --message="Configuring Archivist..." --weight=2
|
ynh_script_progression --message="Configuring Archivist..." --weight=2
|
||||||
|
|
||||||
config_file="$final_path/Backup_list.conf"
|
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 ]
|
if [ $encrypt -eq 1 ]
|
||||||
then
|
then
|
||||||
|
@ -107,8 +103,7 @@ else
|
||||||
encrypt=false
|
encrypt=false
|
||||||
passkey=na
|
passkey=na
|
||||||
fi
|
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 ]
|
if [ $core_backup -eq 1 ]
|
||||||
then
|
then
|
||||||
|
@ -116,7 +111,8 @@ then
|
||||||
else
|
else
|
||||||
core_backup=false
|
core_backup=false
|
||||||
fi
|
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 ]
|
if [ $apps_backup -eq 1 ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Add table
Reference in a new issue