diff --git a/scripts/install b/scripts/install index 74ed9b9..ce92324 100755 --- a/scripts/install +++ b/scripts/install @@ -171,19 +171,19 @@ turnserver_pwd=$(ynh_string_random --length=30) ynh_app_setting_set --app=$app --key=turnserver_pwd --value=$turnserver_pwd ynh_print_ON -coturn_config_path="/etc/$app/coturn.conf" +# coturn_config_path="/etc/$app/coturn.conf" -cp ../conf/coturn/turnserver.conf "$coturn_config_path" -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" -ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TURNSERVER_TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TURNSERVER_TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__CLI_PORT__ --replace_string=$cli_port --target_file="$coturn_config_path" -ynh_print_OFF -ynh_replace_string --match_string=__TURNSERVER_PWD__ --replace_string=$turnserver_pwd --target_file="$coturn_config_path" -ynh_print_ON +# cp ../conf/coturn/turnserver.conf "$coturn_config_path" +# ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__TURNSERVER_TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__TURNSERVER_TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__CLI_PORT__ --replace_string=$cli_port --target_file="$coturn_config_path" +# ynh_print_OFF +# ynh_replace_string --match_string=__TURNSERVER_PWD__ --replace_string=$turnserver_pwd --target_file="$coturn_config_path" +# ynh_print_ON -#ynh_add_config --template="../conf/coturn/turnserver.conf" --destination="/etc/$app/coturn.conf" +ynh_add_config --template="../conf/coturn/turnserver.conf" --destination="/etc/$app/coturn.conf" # Get public IP and set as external IP for coturn # note: '|| true' is used to ignore the errors if we can't get the public ipv4 or ipv6 @@ -201,28 +201,28 @@ 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" +# 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" -#ynh_add_config --template="../conf/passwd" --destination="$final_path/data/passwd" +ynh_add_config --template="../conf/passwd" --destination="$final_path/data/passwd" ynh_store_file_checksum --file="$final_path/data/passwd" -mv ../conf/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" -#ynh_add_config --template="../conf/groupname.json" --destination="$final_path/groups/$group_name.json" +# mv ../conf/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" +ynh_add_config --template="../conf/groupname.json" --destination="$final_path/groups/$group_name.json" ynh_store_file_checksum --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=$domain --target_file="$final_path/data/ice-servers.json" -ynh_replace_string --match_string=__APP__ --replace_string=$app --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 -#ynh_add_config --template="../conf/ice-servers.json" --destination="$final_path/data/ice-servers.json" +# cp ../conf/ice-servers.json $final_path/data/ice-servers.json +# ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json" +# ynh_replace_string --match_string=__APP__ --replace_string=$app --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 +ynh_add_config --template="../conf/ice-servers.json" --destination="$final_path/data/ice-servers.json" ynh_store_file_checksum --file="$final_path/data/ice-servers.json" #================================================= diff --git a/scripts/restore b/scripts/restore index c7c8713..3c3cfd3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -140,20 +140,20 @@ ynh_print_ON # WARNING : these commands are used in INSTALL, UPGRADE # For any update do it in all files -coturn_config_path="/etc/$app/coturn.conf" +# coturn_config_path="/etc/$app/coturn.conf" -cp ../settings/conf/coturn/turnserver.conf "$coturn_config_path" +# cp ../settings/conf/coturn/turnserver.conf "$coturn_config_path" -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" -ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__CLI_PORT__ --replace_string=$cli_port --target_file="$coturn_config_path" -ynh_print_OFF -ynh_replace_string --match_string=__TURNPWD__ --replace_string=$turnserver_pwd --target_file="$coturn_config_path" -ynh_print_ON +# ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__CLI_PORT__ --replace_string=$cli_port --target_file="$coturn_config_path" +# ynh_print_OFF +# ynh_replace_string --match_string=__TURNPWD__ --replace_string=$turnserver_pwd --target_file="$coturn_config_path" +# ynh_print_ON -#ynh_add_config --template="../settings/conf/coturn/turnserver.conf" --destination="/etc/$app/coturn.conf" +ynh_add_config --template="../settings/conf/coturn/turnserver.conf" --destination="/etc/$app/coturn.conf" # Get public IP and set as external IP for coturn # note : '|| true' is used to ignore the errors if we can't get the public ipv4 or ipv6 diff --git a/scripts/upgrade b/scripts/upgrade index e2f4929..638f89b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -164,19 +164,19 @@ ynh_script_progression --message="Updating Coturn config..." --weight=1 # WARNING : theses command are used in INSTALL, UPGRADE # For any update do it in all files -coturn_config_path="/etc/$app/coturn.conf" +# coturn_config_path="/etc/$app/coturn.conf" -cp ../conf/coturn/turnserver.conf $coturn_config_path -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" -ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TURNSERVER_TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__TURNSERVER_TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$coturn_config_path" -ynh_replace_string --match_string=__CLI_PORT__ --replace_string=$cli_port --target_file="$coturn_config_path" -ynh_print_OFF -ynh_replace_string --match_string=__TURNSERVER_PWD__ --replace_string=$turnserver_pwd --target_file="$coturn_config_path" -ynh_print_ON +# cp ../conf/coturn/turnserver.conf $coturn_config_path +# ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__TURNSERVER_TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__TURNSERVER_TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$coturn_config_path" +# ynh_replace_string --match_string=__CLI_PORT__ --replace_string=$cli_port --target_file="$coturn_config_path" +# ynh_print_OFF +# ynh_replace_string --match_string=__TURNSERVER_PWD__ --replace_string=$turnserver_pwd --target_file="$coturn_config_path" +# ynh_print_ON -#ynh_add_config --template="../conf/coturn/turnserver.conf" --destination="/etc/$app/coturn.conf" +ynh_add_config --template="../conf/coturn/turnserver.conf" --destination="/etc/$app/coturn.conf" # Get public IP and set as external IP for coturn # note : '|| true' is used to ignore the errors if we can't get the public ipv4 or ipv6 @@ -205,22 +205,22 @@ chmod +x $final_path/Coturn_config_rotate.sh # 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" +# 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" -#ynh_add_config --template="../conf/passwd" --destination="$final_path/data/passwd" +ynh_add_config --template="../conf/passwd" --destination="$final_path/data/passwd" -cp ../conf/ice-servers.json $final_path/data/ice-servers.json -ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json" -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/data/ice-servers.json" -ynh_replace_string --match_string=__TURNSERVER_TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$final_path/data/ice-servers.json" -ynh_replace_string --match_string=__TURNSERVER_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=__TURNSERVER_PWD__ --replace_string=$turnserver_pwd --target_file="$final_path/data/ice-servers.json" -ynh_print_ON +# cp ../conf/ice-servers.json $final_path/data/ice-servers.json +# ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json" +# ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/data/ice-servers.json" +# ynh_replace_string --match_string=__TURNSERVER_TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$final_path/data/ice-servers.json" +# ynh_replace_string --match_string=__TURNSERVER_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=__TURNSERVER_PWD__ --replace_string=$turnserver_pwd --target_file="$final_path/data/ice-servers.json" +# ynh_print_ON -#ynh_add_config --template="../conf/ice-servers.json" --destination="$final_path/data/ice-servers.json" +ynh_add_config --template="../conf/ice-servers.json" --destination="$final_path/data/ice-servers.json" #================================================= # NGINX CONFIGURATION