From fbc1fec98918ed7f61a4e54e83cb18cd6120f347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 13 Mar 2024 23:18:43 +0100 Subject: [PATCH] Put all config for synapse into /etc/matrix-synapse --- conf/synapse-coturn.service | 2 +- scripts/backup | 1 - scripts/install | 2 +- scripts/remove | 1 - scripts/upgrade | 5 ++++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/conf/synapse-coturn.service b/conf/synapse-coturn.service index d02409b..6b34a13 100644 --- a/conf/synapse-coturn.service +++ b/conf/synapse-coturn.service @@ -7,7 +7,7 @@ After=syslog.target network-online.target User=turnserver Group=turnserver Type=notify -EnvironmentFile=/etc/default/coturn-__APP__ +EnvironmentFile=/etc/matrix-__APP__/coturn_env ExecStart=/usr/bin/turnserver -c /etc/matrix-__APP__/coturn.conf $EXTRA_OPTIONS --pidfile= Restart=on-failure InaccessibleDirectories=/home diff --git a/scripts/backup b/scripts/backup index 4b419cb..63b9526 100644 --- a/scripts/backup +++ b/scripts/backup @@ -71,7 +71,6 @@ ynh_backup --src_path="/etc/matrix-$app" #================================================= ynh_backup --src_path="/etc/systemd/system/$app.service" -ynh_backup --src_path="/etc/default/coturn-$app" ynh_backup --src_path="/etc/systemd/system/$app-coturn.service" #================================================= diff --git a/scripts/install b/scripts/install index 8aa7a78..a403b12 100644 --- a/scripts/install +++ b/scripts/install @@ -193,7 +193,7 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=2 # Create systemd service for synapse and turnserver ynh_add_systemd_config --service=$app --template=synapse.service -cp ../conf/default_coturn /etc/default/coturn-$app +cp ../conf/default_coturn /etc/matrix-$app/coturn_env ynh_add_systemd_config --service=$app-coturn --template=synapse-coturn.service #================================================= diff --git a/scripts/remove b/scripts/remove index 9ca72db..56f5c74 100755 --- a/scripts/remove +++ b/scripts/remove @@ -36,7 +36,6 @@ ynh_script_progression --message="Removing app main directory" --weight=2 ynh_secure_remove --file=$code_dir ynh_secure_remove --file=/var/log/matrix-$app ynh_secure_remove --file=/etc/matrix-$app -ynh_secure_remove --file=/etc/default/coturn-$app ynh_secure_remove --file=/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ada47aa..adbee18 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -205,6 +205,9 @@ then ynh_app_setting_set --app=$app --key=enable_dtls_for_audio_video_turn_call --value=$enable_dtls_for_audio_video_turn_call fi +# remove legacy env file into /etc/default +ynh_secure_remove --file=/etc/default/coturn-$app + #================================================= # MIGRATION 7 : STANDARDIZE SYSTEMD UNIT #================================================= @@ -463,7 +466,7 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=3 # Create systemd service for synapse and turnserver ynh_add_systemd_config --service=$app --template=synapse.service -cp ../conf/default_coturn /etc/default/coturn-$app +cp ../conf/default_coturn /etc/matrix-$app/coturn_env ynh_add_systemd_config --service=$app-coturn --template=synapse-coturn.service #=================================================