diff --git a/README.md b/README.md index c4ea1f7..0048b53 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Instant messaging server matrix network. Yunohost chatroom with matrix : [https://matrix.to/#/#yunohost:matrix.org](https://matrix.to/#/#yunohost:matrix.org) -**Shipped version:** 1.84.1~ynh1 +**Shipped version:** 1.84.1~ynh2 ## Disclaimers / important information ## Configuration diff --git a/README_fr.md b/README_fr.md index 87253c7..0fa0088 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Instant messaging server matrix network. Yunohost chatroom with matrix : [https://matrix.to/#/#yunohost:matrix.org](https://matrix.to/#/#yunohost:matrix.org) -**Version incluse :** 1.84.1~ynh1 +**Version incluse :** 1.84.1~ynh2 ## Avertissements / informations importantes ## Configuration diff --git a/manifest.json b/manifest.json index 14b9e3b..bb3cee5 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Instant messaging server which uses Matrix", "fr": "Serveur de messagerie instantané basé sur Matrix" }, - "version": "1.84.1~ynh1", + "version": "1.84.1~ynh2", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/upgrade b/scripts/upgrade index e78c188..e48f9d8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -380,7 +380,14 @@ ynh_add_config --template="../sources/update_synapse_for_appservice.sh" --destin # Ensure app-service folder has exists and the config file exit (Migration) mkdir -p /etc/matrix-$app/app-service -test -e /etc/matrix-$app/conf.d/app_service.yaml || touch /etc/matrix-$app/conf.d/app_service.yaml +if [ -e /etc/matrix-$app/conf.d/app_service.yaml ]; then + # ensure that the file is empty if no app service are installed (fix issue #385) + if [ ! "$(ls -A /etc/matrix-$app/app-service)" ]; then + echo "" > /etc/matrix-$app/conf.d/app_service.yaml + fi +else + touch /etc/matrix-$app/conf.d/app_service.yaml +fi #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/sources/update_synapse_for_appservice.sh b/sources/update_synapse_for_appservice.sh index fda5ddb..072c3dd 100644 --- a/sources/update_synapse_for_appservice.sh +++ b/sources/update_synapse_for_appservice.sh @@ -8,6 +8,8 @@ cp $service_config_file /tmp/app_service_backup.yaml if [ -n "$(ls /etc/matrix-$app/app-service/)" ]; then echo "app_service_config_files:" > $service_config_file +else + echo "" > $service_config_file fi for f in $(ls /etc/matrix-$app/app-service/); do echo " - /etc/matrix-$app/app-service/$f" >> $service_config_file