From 21e3ef78ca1acfe09d836d19c9e624cc1087f24f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 12 Jan 2021 17:08:52 +0100 Subject: [PATCH] Update install --- scripts/install | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/scripts/install b/scripts/install index f8ad551..8e54719 100755 --- a/scripts/install +++ b/scripts/install @@ -139,29 +139,6 @@ mkdir -p /etc/$app cp ../conf/coturn/default_coturn /etc/default/coturn-$app ynh_add_systemd_config --service=coturn-$app --template=coturn-galene.service -#================================================= -# MODIFY A CONFIG FILE -#================================================= - -cp ../conf/passwd $final_path/data/passwd - -ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/data/passwd" -ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/data/passwd" - -mv -f $final_path/groups/groupname.json $final_path/groups/$group_name.json - -ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/groups/$group_name.json" -ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/groups/$group_name.json" - -cp ../conf/ice-servers.json $final_path/data/ice-servers.json - -ynh_replace_string --match_string=__DOMAIN__ --replace_string=$admin --target_file="$final_path/data/ice-servers.json" -ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$final_path/data/ice-servers.json" -ynh_replace_string --match_string=__TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$final_path/data/ice-servers.json" -ynh_print_OFF -ynh_replace_string --match_string=__TURNPWD__ --replace_string=$turnserver_pwd --target_file="$final_path/data/ice-servers.json" -ynh_print_ON - #================================================= # STORE THE CONFIG FILE CHECKSUM #================================================= @@ -215,6 +192,29 @@ fi ynh_store_file_checksum --file="$coturn_config_path" +#================================================= +# MODIFY A CONFIG FILE +#================================================= + +cp ../conf/passwd $final_path/data/passwd + +ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/data/passwd" +ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/data/passwd" + +mv -f $final_path/groups/groupname.json $final_path/groups/$group_name.json + +ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/groups/$group_name.json" +ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/groups/$group_name.json" + +cp ../conf/ice-servers.json $final_path/data/ice-servers.json + +ynh_replace_string --match_string=__DOMAIN__ --replace_string=$admin --target_file="$final_path/data/ice-servers.json" +ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$final_path/data/ice-servers.json" +ynh_replace_string --match_string=__TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$final_path/data/ice-servers.json" +ynh_print_OFF +ynh_replace_string --match_string=__TURNPWD__ --replace_string=$turnserver_pwd --target_file="$final_path/data/ice-servers.json" +ynh_print_ON + #================================================= # SETUP LOGROTATE #=================================================