From 8392c7495fb3a49ce47d07834cf08bec78cfbdac Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 20 Feb 2021 15:48:05 +0100 Subject: [PATCH] Fix --- scripts/install | 5 ++++- scripts/upgrade | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 72164c5..cea7d43 100755 --- a/scripts/install +++ b/scripts/install @@ -233,7 +233,10 @@ ynh_use_logrotate --logfile "/var/log/$app" # WARNING : theses command are used in INSTALL, UPGRADE # For any update do it in all files -ynh_add_config --template="../sources/Coturn_config_rotate.sh" --destination="$final_path/Coturn_config_rotate.sh" +cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh +ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" +ynh_replace_string --match_string=__IPV4__ --replace_string=$public_ip4 --target_file="$final_path/Coturn_config_rotate.sh" +ynh_replace_string --match_string=__IPV6__ --replace_string=$public_ip6 --target_file="$final_path/Coturn_config_rotate.sh" chmod +x $final_path/Coturn_config_rotate.sh #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 5907cf5..2e97ba2 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -201,7 +201,10 @@ ynh_store_file_checksum --file="$coturn_config_path" # WARNING : theses command are used in INSTALL, UPGRADE # For any update do it in all files -ynh_add_config --template="../sources/Coturn_config_rotate.sh" --destination="$final_path/Coturn_config_rotate.sh" +cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh +ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" +ynh_replace_string --match_string=__IPV4__ --replace_string=$public_ip4 --target_file="$final_path/Coturn_config_rotate.sh" +ynh_replace_string --match_string=__IPV6__ --replace_string=$public_ip6 --target_file="$final_path/Coturn_config_rotate.sh" chmod +x $final_path/Coturn_config_rotate.sh #=================================================