diff --git a/conf/hosts.xml b/conf/hosts.xml index ad7d401..710f957 100644 --- a/conf/hosts.xml +++ b/conf/hosts.xml @@ -1,15 +1,15 @@ -
DOMAINTOCHANGE
- muc.DOMAINTOCHANGE - pubsub.DOMAINTOCHANGE - vjud.DOMAINTOCHANGE - anonymous.DOMAINTOCHANGE +
__DOMAIN__
+ muc.__DOMAIN__ + pubsub.__DOMAIN__ + vjud.__DOMAIN__ + anonymous.__DOMAIN__ stun.jappix.com - https://DOMAINTOCHANGEPATHTOCHANGE/http-bind + https://__DOMAIN____FINALPATH__/http-bind diff --git a/conf/main.xml b/conf/main.xml index 6db30ad..24c5f17 100644 --- a/conf/main.xml +++ b/conf/main.xml @@ -1,12 +1,12 @@ - CHANGENAME + __NAME__ a free social network - CHANGELANG - CHANGENAME + __LANGUAGE__ + __NAME__ on off on diff --git a/scripts/install b/scripts/install index fe0b5a6..181884a 100644 --- a/scripts/install +++ b/scripts/install @@ -68,26 +68,24 @@ chown -R www-data: $final_path #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=1 +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# Validate language -#================================================= - -[[ -e "${final_path}/i18n/${language}" ]] \ - || language="en" - #================================================= # Set Jappix configuration #================================================= -sed -i "s@PATHTOCHANGE@${final_path}@g" "$final_path/store/conf/hosts.xml" -sed -i "s@CHANGELANG@${language}@g" "$final_path/store/conf/main.xml" -sed -i "s@CHANGENAME@${name}@g" "$final_path/store/conf/main.xml" -sed -i "s@DOMAINTOCHANGE@${domain}@g" "$final_path/store/conf/hosts.xml" +cp ../conf/hosts.xml $final_path/store/conf/hosts.xml + +ynh_replace_string --match_string="__DOMAIN__" --replace_string=$domain --target_file="$final_path/store/conf/hosts.xml" +ynh_replace_string --match_string="__FINALPATH__" --replace_string=$final_path --target_file="$final_path/store/conf/hosts.xml" + +cp ../conf/main.xml $final_path/store/conf/main.xml + +ynh_replace_string --match_string="__LANGUAGE__" --replace_string=$language --target_file="$final_path/store/conf/main.xml" +ynh_replace_string --match_string="__NAME__" --replace_string=$name --target_file="$final_path/store/conf/main.xml" #================================================= # RELOAD NGINX diff --git a/scripts/remove b/scripts/remove index e744c92..9aaf8e0 100644 --- a/scripts/remove +++ b/scripts/remove @@ -22,7 +22,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --time --weight=3 +ynh_script_progression --message="Removing app main directory..." --weight=3 # Remove the app directory securely ynh_secure_remove --file=$final_path