1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jappix_ynh.git synced 2024-09-03 19:26:19 +02:00
This commit is contained in:
ericgaspar 2020-11-22 22:34:17 +01:00
parent 146fe2942b
commit d087e75944
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 20 additions and 22 deletions

View file

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<jappix xmlns="jappix:conf:hosts">
<main>DOMAINTOCHANGE</main>
<muc>muc.DOMAINTOCHANGE</muc>
<pubsub>pubsub.DOMAINTOCHANGE</pubsub>
<vjud>vjud.DOMAINTOCHANGE</vjud>
<anonymous>anonymous.DOMAINTOCHANGE</anonymous>
<main>__DOMAIN__</main>
<muc>muc.__DOMAIN__</muc>
<pubsub>pubsub.__DOMAIN__</pubsub>
<vjud>vjud.__DOMAIN__</vjud>
<anonymous>anonymous.__DOMAIN__</anonymous>
<stun>stun.jappix.com</stun>
<turn></turn>
<turn_username></turn_username>
<turn_password></turn_password>
<bosh>https://DOMAINTOCHANGEPATHTOCHANGE/http-bind</bosh>
<bosh>https://__DOMAIN____FINALPATH__/http-bind</bosh>
<bosh_main></bosh_main>
<bosh_mini></bosh_mini>
<websocket></websocket>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<jappix xmlns="jappix:conf:main">
<name>CHANGENAME</name>
<name>__NAME__</name>
<desc>a free social network</desc>
<owner_name></owner_name>
<owner_website></owner_website>
<legal></legal>
<language>CHANGELANG</language>
<resource>CHANGENAME</resource>
<language>__LANGUAGE__</language>
<resource>__NAME__</resource>
<lock>on</lock>
<anonymous>off</anonymous>
<http_auth>on</http_auth>

View file

@ -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

View file

@ -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