mirror of
https://github.com/YunoHost-Apps/synapse-admin_ynh.git
synced 2024-09-03 20:26:34 +02:00
commit
db0ba26e0d
10 changed files with 36 additions and 34 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
Admin UI for Synapse
|
Admin UI for Synapse
|
||||||
|
|
||||||
**Shipped version:** 0.8.3~ynh1
|
**Shipped version:** 0.8.5~ynh1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
Admin UI pour Synapse
|
Admin UI pour Synapse
|
||||||
|
|
||||||
**Version incluse :** 0.8.3~ynh1
|
**Version incluse :** 0.8.5~ynh1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld"
|
domain="domain.tld"
|
||||||
|
synapse_domain="sub.domain.tld"
|
||||||
path="/path"
|
path="/path"
|
||||||
admin="john"
|
admin="john"
|
||||||
is_public=1
|
is_public=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=1
|
setup_sub_dir=0
|
||||||
setup_root=1
|
setup_root=1
|
||||||
setup_nourl=0
|
setup_nourl=0
|
||||||
setup_private=1
|
setup_private=1
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# If you set this setting, the user will not be able to select
|
# If you set this setting, the user will not be able to select
|
||||||
# the server and have to use synapse-admin with this server.
|
# the server and have to use synapse-admin with this server.
|
||||||
|
|
||||||
REACT_APP_SERVER=https://__DOMAIN__
|
REACT_APP_SERVER=https://__SYNAPSE_DOMAIN__
|
||||||
|
|
||||||
#Define the port to avoid collisions on port 3000
|
#Define the port to avoid collisions on port 3000
|
||||||
PORT=__PORT__
|
PORT=__PORT__
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/Awesome-Technologies/synapse-admin/archive/refs/tags/0.8.4.tar.gz
|
SOURCE_URL=https://github.com/Awesome-Technologies/synapse-admin/archive/refs/tags/0.8.5.tar.gz
|
||||||
SOURCE_SUM=5c49b539587bb58ccddf0aa102215dfb963b848cab9e8078f1ad5d626ffda98f
|
SOURCE_SUM=9d3a3fd8f110e937061e37ebf2298f824f171020df8933a229f2ec40684394a8
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
|
@ -16,16 +16,20 @@ location / {
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /.well-known/acme-challenge {
|
||||||
|
proxy_pass http://127.0.0.1:8009;
|
||||||
|
}
|
||||||
|
|
||||||
location /.well-known/matrix/server {
|
location /.well-known/matrix/server {
|
||||||
return 200 '{ "m.server": "__DOMAIN__:443" }';
|
return 200 '{ "m.server": "__SYNAPSE_DOMAIN__:443" }';
|
||||||
}
|
}
|
||||||
|
|
||||||
location /.well-known/matrix/client {
|
location /.well-known/matrix/client {
|
||||||
return 200 '{ "m.homeserver": { "base_url": "https://__DOMAIN__" } }';
|
return 200 '{ "m.homeserver": { "base_url": "https://__SYNAPSE_DOMAIN__" } }';
|
||||||
}
|
}
|
||||||
|
|
||||||
location /_matrix {
|
location /_matrix {
|
||||||
proxy_pass http://localhost:8008;
|
proxy_pass http://127.0.0.1:8008;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_read_timeout 600;
|
proxy_read_timeout 600;
|
||||||
|
@ -33,7 +37,7 @@ location /_matrix {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /_synapse/admin {
|
location /_synapse/admin {
|
||||||
proxy_pass http://localhost:8008;
|
proxy_pass http://127.0.0.1:8008;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_read_timeout 600;
|
proxy_read_timeout 600;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Admin UI for Synapse",
|
"en": "Admin UI for Synapse",
|
||||||
"fr": "Admin UI pour Synapse"
|
"fr": "Admin UI pour Synapse"
|
||||||
},
|
},
|
||||||
"version": "0.8.3~ynh1",
|
"version": "0.8.5~ynh1",
|
||||||
"url": "https://github.com/Awesome-Technologies/synapse-admin",
|
"url": "https://github.com/Awesome-Technologies/synapse-admin",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
@ -30,6 +30,16 @@
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain"
|
"type": "domain"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "synapse_domain",
|
||||||
|
"type": "domain",
|
||||||
|
"ask": {
|
||||||
|
"en": "The domain of your Synapse server",
|
||||||
|
"fr": "Le domain de votre serveur Synapse"
|
||||||
|
},
|
||||||
|
"example": "synapse.example.com",
|
||||||
|
"default": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|
|
@ -70,7 +70,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action=stop --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY URL IN NGINX CONF
|
# MODIFY URL IN NGINX CONF
|
||||||
|
|
|
@ -23,7 +23,8 @@ ynh_abort_if_errors
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url="/"
|
path_url="/"
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
#synapse_domain=$(yunohost app setting synapse domain)
|
synapse_domain=$YNH_APP_ARG_SYNAPSE_DOMAIN
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -44,6 +45,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
|
ynh_app_setting_set --app=$app --key=synapse_domain --value=$synapse_domain
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -84,12 +86,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir=$final_path
|
ynh_setup_source --dest_dir=$final_path
|
||||||
|
|
||||||
#git clone --quiet https://github.com/Awesome-Technologies/synapse-admin.git -b master "$final_path"
|
|
||||||
# Reset branch to the level of update we needed
|
|
||||||
#pushd "$final_path"
|
|
||||||
# git reset --hard --quiet $version_commit
|
|
||||||
#popd
|
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
@ -102,13 +98,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ADD A CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|
||||||
|
|
||||||
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#==============================================
|
#==============================================
|
||||||
|
|
|
@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
|
synapse_domain=$(ynh_app_setting_get --app=$app --key=synapse_domain)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -46,6 +47,10 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
|
if ynh_compare_current_package_version --comparison le --version 0.8.3~ynh2
|
||||||
|
then
|
||||||
|
ynh_die --message="Upgrade from version 0.8.3 is not possible. You must uninstall and reinstall Synapse-admin package manually"
|
||||||
|
fi
|
||||||
# Cleaning legacy permissions
|
# Cleaning legacy permissions
|
||||||
if ynh_legacy_permissions_exists; then
|
if ynh_legacy_permissions_exists; then
|
||||||
ynh_legacy_permissions_delete_all
|
ynh_legacy_permissions_delete_all
|
||||||
|
@ -78,14 +83,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=160
|
ynh_script_progression --message="Upgrading source files..." --weight=160
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
#pushd "$final_path"
|
|
||||||
# git fetch --quiet
|
|
||||||
# git checkout master --quiet
|
|
||||||
# git pull --quiet
|
|
||||||
# git reset --hard $version_commit --quiet
|
|
||||||
#popd
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
|
|
Loading…
Reference in a new issue