From 4483455f8874b74530499c425a1ab18f4a09909a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 11 Jan 2021 18:34:23 +0100 Subject: [PATCH 01/37] Create ice-servers.json --- conf/ice-servers.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 conf/ice-servers.json diff --git a/conf/ice-servers.json b/conf/ice-servers.json new file mode 100644 index 0000000..f121400 --- /dev/null +++ b/conf/ice-servers.json @@ -0,0 +1,11 @@ +[ + { + "urls": [ + "turn:turn.example.com:443", + "turn:turn.example.com:443?transport=tcp" + ], + "username": "galene", + "credential": "secret", + "credentialType": "hmac-sha1" + } +] \ No newline at end of file From c6945330256ca2d93456aaa5a3e0880c0af8512a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 11 Jan 2021 18:43:39 +0100 Subject: [PATCH 02/37] Update manifest.json --- manifest.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index f969fe7..df87974 100644 --- a/manifest.json +++ b/manifest.json @@ -48,8 +48,8 @@ "fr": "Définissez le mot de passe administrateur" }, "help": { - "en": "Use the help field to add an information for the admin about this question.", - "fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." + "en": "Set the administrator password (between 8 and 30 characters)", + "fr": "Définissez le mot de passe administrateur (entre 8 et 30 caractères)" }, "example": "Choose a password" }, @@ -73,6 +73,10 @@ "en": "Choose a name for the group you want to create", "fr": "Choisissez un nom pour le groupe que vous voulez créer" }, + "help": { + "en": "The name will be used as filename (do not use space, dots or / in your name group).", + "fr": "Le nom sera utilisé comme nom de fichier (n'utilisez pas d'espace, de points ou / dans votre groupe de noms)." + }, "default": "groupname", "example": "groupname" } From 1de43644e873a0f4dcba226731adfee4d0acc593 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 11 Jan 2021 18:45:37 +0100 Subject: [PATCH 03/37] Add coturn --- scripts/_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 24e8305..0b5967b 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="" +pkg_dependencies="coturn" #================================================= # PERSONAL HELPERS @@ -43,4 +43,4 @@ ynh_detect_arch(){ architecture="unknown" fi echo $architecture -} \ No newline at end of file +} From c884499dfa8ac3dcf5d4bc1769aed70624983193 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 12 Jan 2021 11:21:36 +0100 Subject: [PATCH 04/37] =?UTF-8?q?Add=20=C3=A8=20to=20Gal=C3=A8ne?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index df87974..59485de 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name": "Galene", + "name": "Galène", "id": "galene", "packaging_format": 1, "description": { From 4e0e3a4d739b7e8a9f4ad799d30ee146844f3c62 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 13 Jan 2021 23:06:38 +0100 Subject: [PATCH 05/37] Update install --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 07a0223..e0dd280 100755 --- a/scripts/install +++ b/scripts/install @@ -161,7 +161,7 @@ ynh_add_systemd_config --service=coturn-$app --template=coturn-galene.service #================================================= ynh_script_progression --message="Configuring coturn..." --weight=1 -# WARNING : theses command are used in INSTALL, UPGRADE +# WARNING: theses command are used in INSTALL, UPGRADE # For any update do it in all files # Find password for turnserver @@ -184,7 +184,7 @@ ynh_replace_string --match_string=__TURNPWD__ --replace_string=$turnserver_pwd - ynh_print_ON # Get public IP and set as external IP for coturn -# note : '|| true' is used to ignore the errors if we can't get the public ipv4 or ipv6 +# note: '|| true' is used to ignore the errors if we can't get the public ipv4 or ipv6 public_ip4="$(curl ip.yunohost.org)" || true public_ip6="$(curl ipv6.yunohost.org)" || true @@ -209,7 +209,7 @@ cp ../conf/passwd $final_path/data/passwd ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/data/passwd" ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/data/passwd" -mv ../conf/groupname.json $final_path/groups/$group_name.json +cp ../conf/groupname.json $final_path/groups/$group_name.json ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/groups/$group_name.json" ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/groups/$group_name.json" From ecc34afa8cacd6f116a327f1e54986b0298f96a5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 14:36:51 +0100 Subject: [PATCH 06/37] Add send email --- README.md | 29 ++++++++++++++++++++++++++++- scripts/install | 18 ++++++++++++++++++ scripts/restore | 15 +++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f1154eb..9b39d0e 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,34 @@ Galène is a videoconferencing server that is easy to deploy (just copy a few fi ## Configuration -To check if the TURN server is up and running, type `/relay-test` in the chat box; if the TURN server is properly configured, you should see a message saying that the relay test has been successful. +### Turnserver + +For Voip and video conferencing a turnserver is also installed (and configured). The turnserver listens on two UDP and TCP ports. You can get them with these commands: + +``` +sudo yunohost app setting galene turnserver_tls_port +sudo yunohost app setting galene turnserver_alt_tls_port +``` + +The turnserver will also choose a port dynamically when a new call starts. The range is between 49153 - 49193. + +For some security reason the ports range (49153 - 49193) isn't automatically open by default. If you want to use the synapse server for voip or conferencing you will need to open this port range manually. To do this just run this command: + +``` +sudo yunohost firewall allow Both 49153:49193 +``` + +You might also need to open these ports (if it is not automatically done) on your ISP box. + +To prevent the situation when the server is behind a NAT, the public IP is written in the turnserver config. By this the turnserver can send its real public IP to the client. For more information see [the coturn example config file](https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf#L102-L120).So if your IP changes, you could run the script `/opt/yunohost/__GALENE_INSTANCE_NAME__/Coturn_config_rotate.sh` to update your config. + +If you have a dynamic IP address, you also might need to update this config automatically. To do that just edit a file named `/etc/cron.d/coturn_config_rotate` and add the following content (just adapt the __SYNAPSE_INSTANCE_NAME__ which could be `galene` or maybe `galene__2`). + +``` +*/15 * * * * root bash /opt/yunohost/__GALENE_INSTANCE_NAME__/Coturn_config_rotate.sh; +``` + +To check if the TURN server is up and running in Galène, connect as operator and type `/relay-test` in the chat box; if the TURN server is properly configured, you should see a message saying that the relay test has been successful. ## Documentation diff --git a/scripts/install b/scripts/install index e0dd280..51df491 100755 --- a/scripts/install +++ b/scripts/install @@ -301,6 +301,24 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=2 ynh_systemd_action --service_name=nginx --action=reload +#================================================= +# SEND A README FOR THE ADMIN +#================================================= + +# WARNING : theses command are used in INSTALL, RESTORE +# For any update do it in all files + +echo " +You also need to open the TCP port $synapse_tls_port on your ISP box if it's not automatically done. + +Your Galène server also implements a turnserver (for VoIP), to have this fully functional please read the 'Turnserver' section in the README available here: https://github.com/YunoHost-Apps/galene_ynh . + +If you're facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galene_ynh + +You also need a valid TLS certificate for the domain used by Galène. To do that you can refer to the documentation here: https://yunohost.org/#/certificate_en" > mail_to_send + +ynh_send_readme_to_admin --app_message="mail_to_send" --type="install" + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 643b8ed..2b08f92 100755 --- a/scripts/restore +++ b/scripts/restore @@ -200,6 +200,21 @@ setfacl -R -m user:turnserver:rwX /var/log/$app ynh_restore_file --origin_path="/etc/logrotate.d/$app" +#================================================= +# SEND A README FOR THE ADMIN +#================================================= + +# WARNING : theses command are used in INSTALL, RESTORE +# For any update do it in all files + +echo " + +Your Galène server also implements a turnserver (for VoIP), to have this fully functional please read the 'Turnserver' section in the README available here: https://github.com/YunoHost-Apps/galene_ynh . + +If you're facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galene_ynh" > mail_to_send + +ynh_send_readme_to_admin --app_message="mail_to_send" --type="restore" + #================================================= # GENERIC FINALIZATION #================================================= From b181711c08f1fcab6dee933b0ad05820da2abe8c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 16:01:14 +0100 Subject: [PATCH 07/37] Fix --- README.md | 12 ++++++------ conf/coturn-galene.service | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9b39d0e..8378274 100644 --- a/README.md +++ b/README.md @@ -25,16 +25,16 @@ Galène is a videoconferencing server that is easy to deploy (just copy a few fi ### Turnserver -For Voip and video conferencing a turnserver is also installed (and configured). The turnserver listens on two UDP and TCP ports. You can get them with these commands: +For VoIP and video conferencing a TURN server is also installed (and configured). The TURN server listens on two UDP and TCP ports. You can get them with these commands: ``` sudo yunohost app setting galene turnserver_tls_port sudo yunohost app setting galene turnserver_alt_tls_port ``` -The turnserver will also choose a port dynamically when a new call starts. The range is between 49153 - 49193. +The TURN server will also choose a port dynamically when a new call starts. The range is between 49153 - 49193. -For some security reason the ports range (49153 - 49193) isn't automatically open by default. If you want to use the synapse server for voip or conferencing you will need to open this port range manually. To do this just run this command: +For some security reason the ports range (49153 - 49193) isn't automatically open by default. If you want to use Galène server for VoIP or conferencing you will need to open this port range manually. To do this, just run this command: ``` sudo yunohost firewall allow Both 49153:49193 @@ -42,15 +42,15 @@ sudo yunohost firewall allow Both 49153:49193 You might also need to open these ports (if it is not automatically done) on your ISP box. -To prevent the situation when the server is behind a NAT, the public IP is written in the turnserver config. By this the turnserver can send its real public IP to the client. For more information see [the coturn example config file](https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf#L102-L120).So if your IP changes, you could run the script `/opt/yunohost/__GALENE_INSTANCE_NAME__/Coturn_config_rotate.sh` to update your config. +To prevent the situation when the server is behind a NAT, the public IP is written in the TURN server config. By this the TURN server can send its real public IP to the client. For more information see [the coturn example config file](https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf#L56-L62).So if your IP changes, you could run the script `/opt/yunohost/__GALENE_INSTANCE_NAME__/Coturn_config_rotate.sh` to update your config. -If you have a dynamic IP address, you also might need to update this config automatically. To do that just edit a file named `/etc/cron.d/coturn_config_rotate` and add the following content (just adapt the __SYNAPSE_INSTANCE_NAME__ which could be `galene` or maybe `galene__2`). +If you have a dynamic IP address, you also might need to update this config automatically. To do that just edit a file named `/etc/cron.d/coturn_config_rotate` and add the following content (just adapt the __GALENE_INSTANCE_NAME__ which could be `galene` or maybe `galene__2`). ``` */15 * * * * root bash /opt/yunohost/__GALENE_INSTANCE_NAME__/Coturn_config_rotate.sh; ``` -To check if the TURN server is up and running in Galène, connect as operator and type `/relay-test` in the chat box; if the TURN server is properly configured, you should see a message saying that the relay test has been successful. +To check if Galène can connect to the TURN server, connect to Galène as operator and type `/relay-test` in the chat box; if the TURN server is properly configured, you should see a message saying that the relay test has been successful. ## Documentation diff --git a/conf/coturn-galene.service b/conf/coturn-galene.service index 5cf8abb..09d9cc4 100644 --- a/conf/coturn-galene.service +++ b/conf/coturn-galene.service @@ -1,5 +1,5 @@ [Unit] -Description=coturn +Description=Coturn STUN/TURN Server Documentation=man:coturn(1) man:turnadmin(1) man:turnserver(1) After=syslog.target network.target From 2e91ae1ada23ab7443585bddea8f666baa9093ec Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 16:27:56 +0100 Subject: [PATCH 08/37] Fix --- scripts/install | 11 ++++++++--- scripts/restore | 4 +--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 51df491..3ee5bf3 100755 --- a/scripts/install +++ b/scripts/install @@ -308,10 +308,15 @@ ynh_systemd_action --service_name=nginx --action=reload # WARNING : theses command are used in INSTALL, RESTORE # For any update do it in all files -echo " -You also need to open the TCP port $synapse_tls_port on your ISP box if it's not automatically done. +echo "Galène was successfully installed :) -Your Galène server also implements a turnserver (for VoIP), to have this fully functional please read the 'Turnserver' section in the README available here: https://github.com/YunoHost-Apps/galene_ynh . +Galène is now accesible at this adress: https://$domain + +Your operator credentials: +Username: $admin +Password: $password + +Galène implements a TURN server (for VoIP), to have this fully functional please read the 'TURN server' section in the README available here: https://github.com/YunoHost-Apps/galene_ynh . If you're facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galene_ynh diff --git a/scripts/restore b/scripts/restore index 2b08f92..8903707 100755 --- a/scripts/restore +++ b/scripts/restore @@ -207,9 +207,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" # WARNING : theses command are used in INSTALL, RESTORE # For any update do it in all files -echo " - -Your Galène server also implements a turnserver (for VoIP), to have this fully functional please read the 'Turnserver' section in the README available here: https://github.com/YunoHost-Apps/galene_ynh . +echo "Galène also implements a TURN server (for VoIP), to have this fully functional please read the 'Turnserver' section in the README available here: https://github.com/YunoHost-Apps/galene_ynh . If you're facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galene_ynh" > mail_to_send From f16c8744f6f173c202c75f3f0874445a766e783d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 16:34:46 +0100 Subject: [PATCH 09/37] Fix --- scripts/backup | 2 +- scripts/change_url | 4 ++-- scripts/install | 8 ++------ scripts/remove | 11 ++++------- scripts/restore | 6 +++--- scripts/upgrade | 10 ++++------ 6 files changed, 16 insertions(+), 25 deletions(-) diff --git a/scripts/backup b/scripts/backup index 6ae700f..c0f1b6d 100755 --- a/scripts/backup +++ b/scripts/backup @@ -81,4 +81,4 @@ ynh_backup --src_path="/etc/systemd/system/coturn-$app.service" # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for Galène. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 10d80ee..0dbac85 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 +ynh_script_progression --message="Backing up Galène before changing its URL (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade @@ -121,4 +121,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression --message="Change of URL completed for Galène" --last diff --git a/scripts/install b/scripts/install index 3ee5bf3..85e6c06 100755 --- a/scripts/install +++ b/scripts/install @@ -159,7 +159,7 @@ ynh_add_systemd_config --service=coturn-$app --template=coturn-galene.service #================================================= # SET COTURN CONFIG #================================================= -ynh_script_progression --message="Configuring coturn..." --weight=1 +ynh_script_progression --message="Configuring Coturn..." --weight=1 # WARNING: theses command are used in INSTALL, UPGRADE # For any update do it in all files @@ -173,7 +173,6 @@ ynh_print_ON coturn_config_path="/etc/$app/coturn.conf" cp ../conf/coturn/turnserver.conf "$coturn_config_path" - ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" @@ -205,17 +204,14 @@ ynh_store_file_checksum --file="$coturn_config_path" #================================================= cp ../conf/passwd $final_path/data/passwd - ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/data/passwd" ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/data/passwd" cp ../conf/groupname.json $final_path/groups/$group_name.json - ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/groups/$group_name.json" ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/groups/$group_name.json" cp ../conf/ice-servers.json $final_path/data/ice-servers.json - ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json" ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/data/ice-servers.json" ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$final_path/data/ice-servers.json" @@ -328,4 +324,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --type="install" # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of Galène completed" --last diff --git a/scripts/remove b/scripts/remove index c1c0bc8..66f2e7e 100755 --- a/scripts/remove +++ b/scripts/remove @@ -27,7 +27,7 @@ turnserver_alt_tls_port=$(ynh_app_setting_get --app=$app --key=turnserver_alt_tl #================================================= # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -ynh_script_progression --message="Removing $app service integration..." --weight=1 +ynh_script_progression --message="Removing Galène service integration..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null @@ -60,7 +60,7 @@ ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=2 +ynh_script_progression --message="Removing Galène main directory..." --weight=2 # Remove the app directory securely ynh_secure_remove --file=$final_path @@ -89,7 +89,7 @@ ynh_remove_logrotate closeport() { local port=$1 - if yunohost firewall list | grep -q "\- $$turnserver_tls_port$" + if yunohost firewall list | grep -q "\- $turnserver_tls_port$" then ynh_script_progression --message="Closing port $turnserver_tls_port port" ynh_exec_warn_less yunohost firewall disallow Both $turnserver_tls_port @@ -100,9 +100,6 @@ closeport() { fi } -#closeport $turnserver_tls_port -#closeport $turnserver_alt_tls_port - #================================================= # GENERIC FINALIZATION #================================================= @@ -117,4 +114,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression --message="Removal of Galène completed" --last diff --git a/scripts/restore b/scripts/restore index 8903707..d515607 100755 --- a/scripts/restore +++ b/scripts/restore @@ -63,7 +63,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=1 +ynh_script_progression --message="Restoring Galène main directory..." --weight=1 ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="/etc/$app" @@ -125,7 +125,7 @@ fi #================================================= # RECONFIGURE THE TURNSERVER #================================================= -ynh_script_progression --message="Reconfiguring coturn..." --weight=23 +ynh_script_progression --message="Reconfiguring Coturn..." --weight=23 # To be sure that at the restoration the IP address in coturn config is the same as the real address we remake the coturn config @@ -226,4 +226,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression --message="Restoration completed for Galène" --last diff --git a/scripts/upgrade b/scripts/upgrade index 5504fd3..21babbb 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,7 +50,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 +ynh_script_progression --message="Backing up Galène before upgrading (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade @@ -109,7 +109,7 @@ fi if [ ! -e /etc/$app/coturn.conf ] then - ynh_script_progression --message="Creating an independant service for coturn..." --weight=1 + ynh_script_progression --message="Creating an independant service for Coturn..." --weight=1 #================================================= # CREATE AN INDEPENDANT SERVICE FOR COTURN @@ -159,7 +159,7 @@ fi #================================================= # UPDATE COTURN CONFIG #================================================= -ynh_script_progression --message="Updating coturn config..." --weight=1 +ynh_script_progression --message="Updating Coturn config..." --weight=1 # WARNING : theses command are used in INSTALL, UPGRADE # For any update do it in all files @@ -209,12 +209,10 @@ ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$ #================================================= cp ../conf/passwd $final_path/data/passwd - ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/data/passwd" ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/data/passwd" cp ../conf/ice-servers.json $final_path/data/ice-servers.json - ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json" ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/data/ice-servers.json" ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$final_path/data/ice-servers.json" @@ -306,4 +304,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression --message="Upgrade of Galène completed" --last From 78d77721d9d3ed4932216e25f22111b20863bc87 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 16:39:06 +0100 Subject: [PATCH 10/37] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 95ae81c..3deffad 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name": "Galène", + "name": "Galene", "id": "galene", "packaging_format": 1, "description": { From dfda5fe0db57d46bca4fe427522952fc0f87e685 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 16:47:46 +0100 Subject: [PATCH 11/37] Add french translation --- README.md | 2 +- README_fr.md | 29 ++++++++++++++++++++++++++++- scripts/install | 8 +------- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8378274..bb53f8d 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Galène is a videoconferencing server that is easy to deploy (just copy a few fi ## Configuration -### Turnserver +### TURN server For VoIP and video conferencing a TURN server is also installed (and configured). The TURN server listens on two UDP and TCP ports. You can get them with these commands: diff --git a/README_fr.md b/README_fr.md index 682d3cc..3d4289d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,34 @@ Galène est un serveur de visioconférence facile à déployer (il suffit de cop ## Configuration -Pour vérifier si le serveur TURN est opérationnel, tapez `/relay-test` dans la boîte de dialogue; si le serveur TURN est correctement configuré, vous devriez voir un message indiquant que le test du relais a réussi. +### Serveur TURN + +Pour la VoIP et la visioconférence, un serveur TURN est également installé (et configuré). Le serveur TURN écoute sur deux ports UDP et TCP. Vous pouvez les obtenir avec ces commandes : + +``` +sudo yunohost application paramètre galene turnerserver_tls_port +sudo yunohost application paramètre galene turnerserver_alt_tls_port +``` + +Le serveur TURN choisira également un port de manière dynamique lors du démarrage d'un nouvel appel. La plage est comprise entre 49153 et 49193. + +Pour une raison de sécurité, la plage de ports (49153 - 49193) n'est pas automatiquement ouverte par défaut. Si vous souhaitez utiliser le serveur Galène pour la VoIP ou la conférence, vous devrez ouvrir cette plage de ports manuellement. Pour ce faire, exécutez simplement cette commande : + +``` +sudo yunohost pare-feu autorise les deux 49153:49193 +``` + +Vous devrez peut-être également ouvrir ces ports (si ce n'est pas fait automatiquement) sur votre box FAI. + +Pour éviter la situation où le serveur est derrière un NAT, l'adresse IP publique est écrite dans la configuration du serveur TURN. De cette manière, le serveur TURN peut envoyer sa véritable adresse IP publique au client. Pour plus d'informations, consultez [le fichier de configuration d'exemple Coturn](https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf#L56-L62) .Donc, si votre adresse IP change, vous pouvez exécuter le script `/opt/yunohost/__GALENE_INSTANCE_NAME __/Coturn_config_rotate.sh` pour mettre à jour votre configuration. + +Si vous avez une adresse IP dynamique, vous devrez peut-être également mettre à jour cette configuration automatiquement. Pour ce faire, éditez simplement un fichier nommé `/etc/cron.d/coturn_config_rotate` et ajoutez le contenu suivant (adaptez simplement le __GALENE_INSTANCE_NAME__ qui pourrait être `galene` ou peut-être `galene__2`). + +``` +* / 15 * * * * root bash /opt/yunohost/__GALENE_INSTANCE_NAME__/Coturn_config_rotate.sh; +``` + +Pour vérifier si Galène peut se connecter au serveur TURN, connectez-vous à Galène en tant qu'opérateur et tapez `/relay-test` dans la boîte de dialogue; si le serveur TURN est correctement configuré, vous devriez voir un message indiquant que le test du relais a réussi. ## Documentation diff --git a/scripts/install b/scripts/install index 85e6c06..05fd138 100755 --- a/scripts/install +++ b/scripts/install @@ -308,15 +308,9 @@ echo "Galène was successfully installed :) Galène is now accesible at this adress: https://$domain -Your operator credentials: -Username: $admin -Password: $password - Galène implements a TURN server (for VoIP), to have this fully functional please read the 'TURN server' section in the README available here: https://github.com/YunoHost-Apps/galene_ynh . -If you're facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galene_ynh - -You also need a valid TLS certificate for the domain used by Galène. To do that you can refer to the documentation here: https://yunohost.org/#/certificate_en" > mail_to_send +If you're facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galene_ynh" > mail_to_send ynh_send_readme_to_admin --app_message="mail_to_send" --type="install" From f0b6ace5545d8c74c74c21f46c83d56e84843fe9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 17:05:04 +0100 Subject: [PATCH 12/37] Fix --- README.md | 10 +++++----- README_fr.md | 22 +++++++++++----------- scripts/install | 2 +- scripts/upgrade | 5 ++--- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index bb53f8d..f13c3c1 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Galène is a videoconferencing server that is easy to deploy (just copy a few fi ### TURN server -For VoIP and video conferencing a TURN server is also installed (and configured). The TURN server listens on two UDP and TCP ports. You can get them with these commands: +For VoIP and video conferencing a TURN server is also installed and configured. The TURN server listens on two UDP and TCP ports. You can get them with these commands: ``` sudo yunohost app setting galene turnserver_tls_port @@ -34,7 +34,7 @@ sudo yunohost app setting galene turnserver_alt_tls_port The TURN server will also choose a port dynamically when a new call starts. The range is between 49153 - 49193. -For some security reason the ports range (49153 - 49193) isn't automatically open by default. If you want to use Galène server for VoIP or conferencing you will need to open this port range manually. To do this, just run this command: +For security reason the ports range (49153 - 49193) isn't automatically open by default. If you want to use Galène server for VoIP or conferencing you will need to open this port range manually. To do this, just run this command: ``` sudo yunohost firewall allow Both 49153:49193 @@ -42,12 +42,12 @@ sudo yunohost firewall allow Both 49153:49193 You might also need to open these ports (if it is not automatically done) on your ISP box. -To prevent the situation when the server is behind a NAT, the public IP is written in the TURN server config. By this the TURN server can send its real public IP to the client. For more information see [the coturn example config file](https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf#L56-L62).So if your IP changes, you could run the script `/opt/yunohost/__GALENE_INSTANCE_NAME__/Coturn_config_rotate.sh` to update your config. +To prevent the situation when the server is behind a NAT, the public IP is written in the TURN server config. By this the TURN server can send its real public IP to the client. For more information see the [Coturn example config file](https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf#L56-L62). So if your IP changes, you could run the script `/opt/yunohost/galene/Coturn_config_rotate.sh` to update your config. -If you have a dynamic IP address, you also might need to update this config automatically. To do that just edit a file named `/etc/cron.d/coturn_config_rotate` and add the following content (just adapt the __GALENE_INSTANCE_NAME__ which could be `galene` or maybe `galene__2`). +If you have a dynamic IP address, you also might need to update this config automatically. To do that just edit a file named `/etc/cron.d/coturn_config_rotate` and add the following content. ``` -*/15 * * * * root bash /opt/yunohost/__GALENE_INSTANCE_NAME__/Coturn_config_rotate.sh; +*/15 * * * * root bash /opt/yunohost/galene/Coturn_config_rotate.sh; ``` To check if Galène can connect to the TURN server, connect to Galène as operator and type `/relay-test` in the chat box; if the TURN server is properly configured, you should see a message saying that the relay test has been successful. diff --git a/README_fr.md b/README_fr.md index 3d4289d..194c926 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,32 +25,32 @@ Galène est un serveur de visioconférence facile à déployer (il suffit de cop ### Serveur TURN -Pour la VoIP et la visioconférence, un serveur TURN est également installé (et configuré). Le serveur TURN écoute sur deux ports UDP et TCP. Vous pouvez les obtenir avec ces commandes : +Pour la VoIP et la visioconférence, un serveur TURN est également installé et configuré. Le serveur TURN écoute sur deux ports UDP et TCP. Vous pouvez les obtenir avec ces commandes : ``` -sudo yunohost application paramètre galene turnerserver_tls_port -sudo yunohost application paramètre galene turnerserver_alt_tls_port +sudo yunohost app setting galene turnserver_tls_port +sudo yunohost app setting galene turnserver_alt_tls_port ``` -Le serveur TURN choisira également un port de manière dynamique lors du démarrage d'un nouvel appel. La plage est comprise entre 49153 et 49193. +Le serveur TURN choisira également un port de manière dynamique lors du démarrage d'une nouvelle visioconférence. La plage est comprise entre 49153 et 49193. -Pour une raison de sécurité, la plage de ports (49153 - 49193) n'est pas automatiquement ouverte par défaut. Si vous souhaitez utiliser le serveur Galène pour la VoIP ou la conférence, vous devrez ouvrir cette plage de ports manuellement. Pour ce faire, exécutez simplement cette commande : +Par sécurité, la plage de ports (49153 - 49193) n'est pas automatiquement ouverte par défaut. Si vous souhaitez utiliser Galène pour la VoIP ou la visioconférence, vous devrez ouvrir cette plage de ports manuellement. Pour ce faire, exécutez simplement cette commande : ``` -sudo yunohost pare-feu autorise les deux 49153:49193 +sudo yunohost firewall allow Both 49153:49193 ``` -Vous devrez peut-être également ouvrir ces ports (si ce n'est pas fait automatiquement) sur votre box FAI. +Vous devrez peut-être également ouvrir ces ports (si ce n'est pas fait automatiquement) sur votre box. -Pour éviter la situation où le serveur est derrière un NAT, l'adresse IP publique est écrite dans la configuration du serveur TURN. De cette manière, le serveur TURN peut envoyer sa véritable adresse IP publique au client. Pour plus d'informations, consultez [le fichier de configuration d'exemple Coturn](https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf#L56-L62) .Donc, si votre adresse IP change, vous pouvez exécuter le script `/opt/yunohost/__GALENE_INSTANCE_NAME __/Coturn_config_rotate.sh` pour mettre à jour votre configuration. +Pour éviter la situation où le serveur est derrière un NAT, l'adresse IP publique est écrite dans la configuration du serveur TURN. De cette manière, le serveur TURN peut envoyer sa véritable adresse IP publique au client. Pour plus d'informations, consultez [le fichier de configuration d'exemple Coturn](https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf#L56-L62). Donc, si votre adresse IP change, vous pouvez exécuter le script `/opt/yunohost/galene/Coturn_config_rotate.sh` pour mettre à jour votre configuration. -Si vous avez une adresse IP dynamique, vous devrez peut-être également mettre à jour cette configuration automatiquement. Pour ce faire, éditez simplement un fichier nommé `/etc/cron.d/coturn_config_rotate` et ajoutez le contenu suivant (adaptez simplement le __GALENE_INSTANCE_NAME__ qui pourrait être `galene` ou peut-être `galene__2`). +Si vous avez une adresse IP dynamique, vous devrez peut-être également mettre à jour cette configuration automatiquement. Pour ce faire, éditez simplement un fichier nommé `/etc/cron.d/coturn_config_rotate` et ajoutez le contenu suivant. ``` -* / 15 * * * * root bash /opt/yunohost/__GALENE_INSTANCE_NAME__/Coturn_config_rotate.sh; +* / 15 * * * * root bash /opt/yunohost/galene/Coturn_config_rotate.sh; ``` -Pour vérifier si Galène peut se connecter au serveur TURN, connectez-vous à Galène en tant qu'opérateur et tapez `/relay-test` dans la boîte de dialogue; si le serveur TURN est correctement configuré, vous devriez voir un message indiquant que le test du relais a réussi. +Pour vérifier si Galène peut se connecter au serveur TURN, connectez-vous à Galène en tant qu'opérateur et tapez `/relay-test` dans la boîte de dialogue chat; si le serveur TURN est correctement configuré, vous devriez voir un message indiquant que le test du relais a réussi. ## Documentation diff --git a/scripts/install b/scripts/install index 05fd138..e04ff6b 100755 --- a/scripts/install +++ b/scripts/install @@ -243,7 +243,7 @@ ynh_use_logrotate --logfile "/var/log/$app" # WARNING : theses command are used in INSTALL, UPGRADE # For any update do it in all files -cp ../sources/Coturn_config_rotate.sh $final_path/ +cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 21babbb..aae10d8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -166,8 +166,7 @@ ynh_script_progression --message="Updating Coturn config..." --weight=1 coturn_config_path="/etc/$app/coturn.conf" -cp ../conf/coturn/turnserver.conf "$coturn_config_path" - +cp ../conf/coturn/turnserver.conf $coturn_config_path ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path" ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path" ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path" @@ -201,7 +200,7 @@ ynh_store_file_checksum --file="$coturn_config_path" # WARNING : theses command are used in INSTALL, UPGRADE # For any update do it in all files -cp ../sources/Coturn_config_rotate.sh $final_path/ +cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" #================================================= From 0fca15ef60118c80e196ebc1a3585e6551baaca4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 17:17:50 +0100 Subject: [PATCH 13/37] fix --- conf/groupname.json | 6 +++++- scripts/install | 4 +++- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/conf/groupname.json b/conf/groupname.json index 1d9aadf..c9d4e52 100644 --- a/conf/groupname.json +++ b/conf/groupname.json @@ -4,8 +4,11 @@ {"username": "", "password": ""}, {"username": "", "password": ""} ], + "contact": "__EMAIL__", + "comment": "Public Conference", + "description": "a human-readable description of the group; this is displayed on the landing page for public groups.", + "autolock": true, "public": true, - "description": "This is displayed on the landing page for public groups.", "max-clients": 20, "max-history-age": 14400, "allow-recording": true, @@ -14,3 +17,4 @@ "redirect": "", "codecs": ["vp8", "opus"] } + diff --git a/scripts/install b/scripts/install index e04ff6b..08eacbd 100755 --- a/scripts/install +++ b/scripts/install @@ -26,6 +26,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" admin=$YNH_APP_ARG_ADMIN +email=$(ynh_user_get_info "$admin" mail) is_public=$YNH_APP_ARG_IS_PUBLIC ynh_print_OFF password=$YNH_APP_ARG_PASSWORD @@ -66,7 +67,7 @@ ynh_script_progression --message="Creating a dhparam file..." --weight=3 # WARNING : theses command are used in INSTALL, UPGRADE, RESTORE # For any update do it in all files -# Make dh cert for Galène if it doesn't exist +# Make dhparam cert for Galène if it doesn't exist if [ ! -e /etc/ssl/private/dh2048.pem ] then ynh_exec_warn_less openssl dhparam -out /etc/ssl/private/dh2048.pem -outform PEM -2 2048 -dsaparam @@ -210,6 +211,7 @@ ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --targ cp ../conf/groupname.json $final_path/groups/$group_name.json ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/groups/$group_name.json" ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/groups/$group_name.json" +ynh_replace_string --match_string=__EMAIL__ --replace_string=$email --target_file="$final_path/groups/$group_name.json" cp ../conf/ice-servers.json $final_path/data/ice-servers.json ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json" diff --git a/scripts/restore b/scripts/restore index d515607..f67b3ab 100755 --- a/scripts/restore +++ b/scripts/restore @@ -114,7 +114,7 @@ ynh_script_progression --message="Creating a dhparam file..." --weight=3 # WARNING : theses command are used in INSTALL, UPGRADE, RESTORE # For any update do it in all files -# Make dh cert for synapse if it doesn't exist +# Make dhparam cert for Galène if it doesn't exist if [ ! -e /etc/ssl/private/dh2048.pem ] then ynh_exec_warn_less openssl dhparam -out /etc/ssl/private/dh2048.pem -outform PEM -2 2048 -dsaparam diff --git a/scripts/upgrade b/scripts/upgrade index aae10d8..804b773 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -146,7 +146,7 @@ ynh_script_progression --message="Creating a dhparam file..." --weight=3 # WARNING : theses command are used in INSTALL, UPGRADE, RESTORE # For any update do it in all files -# Make dh cert for Galène if it doesn't exist +# Make dhparam cert for Galène if it doesn't exist if [ ! -e /etc/ssl/private/dh2048.pem ] then ynh_exec_warn_less openssl dhparam -out /etc/ssl/private/dh2048.pem -outform PEM -2 2048 -dsaparam From d290e8ac0fda7a9f10dd0ff5c071fd14e69a43b8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 17:23:43 +0100 Subject: [PATCH 14/37] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 08eacbd..5ceda52 100755 --- a/scripts/install +++ b/scripts/install @@ -208,7 +208,7 @@ cp ../conf/passwd $final_path/data/passwd ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/data/passwd" ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/data/passwd" -cp ../conf/groupname.json $final_path/groups/$group_name.json +mv ../conf/groupname.json $final_path/groups/$group_name.json ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/groups/$group_name.json" ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/groups/$group_name.json" ynh_replace_string --match_string=__EMAIL__ --replace_string=$email --target_file="$final_path/groups/$group_name.json" From c7aff3b34c01e207bb4321de13f6d8dc01f201ab Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 23:10:51 +0100 Subject: [PATCH 15/37] remove email --- conf/groupname.json | 2 +- scripts/install | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/conf/groupname.json b/conf/groupname.json index c9d4e52..e4b1a42 100644 --- a/conf/groupname.json +++ b/conf/groupname.json @@ -4,7 +4,7 @@ {"username": "", "password": ""}, {"username": "", "password": ""} ], - "contact": "__EMAIL__", + "contact": "username@domain.com", "comment": "Public Conference", "description": "a human-readable description of the group; this is displayed on the landing page for public groups.", "autolock": true, diff --git a/scripts/install b/scripts/install index 5ceda52..aebe99f 100755 --- a/scripts/install +++ b/scripts/install @@ -26,7 +26,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" admin=$YNH_APP_ARG_ADMIN -email=$(ynh_user_get_info "$admin" mail) is_public=$YNH_APP_ARG_IS_PUBLIC ynh_print_OFF password=$YNH_APP_ARG_PASSWORD @@ -211,7 +210,6 @@ ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --targ mv ../conf/groupname.json $final_path/groups/$group_name.json ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/groups/$group_name.json" ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/groups/$group_name.json" -ynh_replace_string --match_string=__EMAIL__ --replace_string=$email --target_file="$final_path/groups/$group_name.json" cp ../conf/ice-servers.json $final_path/data/ice-servers.json ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json" From 7ea84f83174a85308689cf483db7a2d157bf076d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 23:12:38 +0100 Subject: [PATCH 16/37] Update groupname.json --- conf/groupname.json | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/groupname.json b/conf/groupname.json index e4b1a42..3582c55 100644 --- a/conf/groupname.json +++ b/conf/groupname.json @@ -17,4 +17,3 @@ "redirect": "", "codecs": ["vp8", "opus"] } - From d40c9060c52b9cf953d1ac23e5b702964912cd1f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 16 Jan 2021 12:55:12 +0100 Subject: [PATCH 17/37] Delete turnserver from ssl-cert --- scripts/remove | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/remove b/scripts/remove index 66f2e7e..c319986 100755 --- a/scripts/remove +++ b/scripts/remove @@ -109,6 +109,7 @@ ynh_script_progression --message="Removing the dedicated system user..." --weigh # Delete a system user ynh_system_user_delete --username=$app +deluser turnserver ssl-cert #================================================= # END OF SCRIPT From 3a30f33b64b4817c30c4ff608a8bbad64326b08a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 17 Jan 2021 11:25:39 +0100 Subject: [PATCH 18/37] Fix links --- scripts/install | 1 - sources/Coturn_config_rotate.sh | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index aebe99f..087a546 100755 --- a/scripts/install +++ b/scripts/install @@ -244,7 +244,6 @@ ynh_use_logrotate --logfile "/var/log/$app" # For any update do it in all files cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" #================================================= # GENERIC FINALIZATION diff --git a/sources/Coturn_config_rotate.sh b/sources/Coturn_config_rotate.sh index 7c2d704..1982f3c 100644 --- a/sources/Coturn_config_rotate.sh +++ b/sources/Coturn_config_rotate.sh @@ -1,6 +1,5 @@ #!/bin/bash -app_instance=__APP__ source /usr/share/yunohost/helpers @@ -19,15 +18,15 @@ then echo "external-ip=$public_ip6" >> "$coturn_config_path" fi -old_config_line=$(egrep "^external-ip=.*\$" "/etc/matrix-$app_instance/coturn.conf") -ynh_replace_string "^external-ip=.*\$" "$external_IP_line" "/etc/matrix-$app_instance/coturn.conf" -new_config_line=$(egrep "^external-ip=.*\$" "/etc/matrix-$app_instance/coturn.conf") +old_config_line=$(egrep "^external-ip=.*\$" "/etc/$app/coturn.conf") +ynh_replace_string "^external-ip=.*\$" "$external_IP_line" "/etc/$app/coturn.conf" +new_config_line=$(egrep "^external-ip=.*\$" "/etc/$app/coturn.conf") -setfacl -R -m user:turnserver:rX /etc/matrix-$app_instance +setfacl -R -m user:turnserver:rX /etc/$app if [ "$old_config_line" != "$new_config_line" ] then - systemctl restart coturn-$app_instance.service + systemctl restart coturn-$app.service fi exit 0 From af4f569d7868895056fcf1666ffd3b9732e59e6a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 17 Jan 2021 11:27:42 +0100 Subject: [PATCH 19/37] Update upgrade --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 804b773..ab21e12 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -201,7 +201,6 @@ ynh_store_file_checksum --file="$coturn_config_path" # For any update do it in all files cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" #================================================= # MODIFY A CONFIG FILE From 89fd9161b3801c77025f0dd675d5eddacfaba766 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 17 Jan 2021 12:18:38 +0100 Subject: [PATCH 20/37] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 3deffad..274c525 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Videoconferencing server that is easy to deploy", "fr": "Serveur de visioconférence facile à déployer" }, - "version": "0.2~ynh3", + "version": "0.2~ynh4", "url": "https://galene.org/", "license": "MIT", "maintainer": { From 75cc3275f80a383855a38364f0f84f21baef64ce Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 19 Jan 2021 16:29:55 +0100 Subject: [PATCH 21/37] Fix --- scripts/install | 1 + scripts/remove | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 087a546..155b2c8 100755 --- a/scripts/install +++ b/scripts/install @@ -140,6 +140,7 @@ ynh_script_progression --message="Configuring system user..." --weight=3 # Create a system user ynh_system_user_create --username=$app +ynh_system_user_create --username=turnserver adduser turnserver ssl-cert #================================================= diff --git a/scripts/remove b/scripts/remove index c319986..e297f87 100755 --- a/scripts/remove +++ b/scripts/remove @@ -109,7 +109,7 @@ ynh_script_progression --message="Removing the dedicated system user..." --weigh # Delete a system user ynh_system_user_delete --username=$app -deluser turnserver ssl-cert +ynh_system_user_delete --username=turnserver #================================================= # END OF SCRIPT From 646e26f5b2d91c08394f3bbf1f1c0647dece23a1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 20 Jan 2021 09:53:29 +0100 Subject: [PATCH 22/37] Update systemd.service --- conf/systemd.service | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/systemd.service b/conf/systemd.service index ddc546d..cff556e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,6 @@ [Unit] Description=Galène: videoconferencing server +Documentation=https://galene.org After=network.target [Service] From f6987b4dce9c44e9e6e98375b8f308bd9d36902d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 20 Jan 2021 09:55:48 +0100 Subject: [PATCH 23/37] Update pull_request_template.md --- pull_request_template.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pull_request_template.md b/pull_request_template.md index ff7ebe8..69ce5a0 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -10,9 +10,3 @@ - [ ] Fix or enhancement tested. - [ ] Upgrade from last version tested. - [ ] Can be reviewed and tested. - -## Package_check results ---- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* - -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/galene_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/galene_ynh%20PR-NUM-%20(USERNAME)/) From 0f232d867f14406a19ebd4f7141f65db55f04919 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 20 Jan 2021 19:18:09 +0100 Subject: [PATCH 24/37] Add doc --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f13c3c1..d15aed7 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ To check if Galène can connect to the TURN server, connect to Galène as operat ## Documentation * Official documentation: https://galene.org/ - * YunoHost documentation: If specific documentation is needed, feel free to contribute. + * YunoHost documentation: https://yunohost.org/#/app_galene ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 194c926..cb74052 100644 --- a/README_fr.md +++ b/README_fr.md @@ -55,7 +55,7 @@ Pour vérifier si Galène peut se connecter au serveur TURN, connectez-vous à G ## Documentation * Documentation officielle : https://galene.org/ - * Documentation YunoHost : If specific documentation is needed, feel free to contribute. + * Documentation YunoHost : https://yunohost.org/#/app_galene_fr ## Caractéristiques spécifiques YunoHost From 2c8f95eeecdf88b4f652d67ff20de1bcd6dc1e46 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 20 Jan 2021 23:38:02 +0100 Subject: [PATCH 25/37] Update nginx.conf --- conf/nginx.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index a79f5aa..99f65cc 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,4 +17,15 @@ location __PATH__/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; + + location __PATH__/ws/ { + proxy_pass http://wsbackend; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } + + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } From 90ddd0458a8ff979b46ee4b4b0f55d72e3b49c10 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 21 Jan 2021 11:46:25 +0100 Subject: [PATCH 26/37] Update nginx.conf --- conf/nginx.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 99f65cc..a9b7a9e 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -18,14 +18,14 @@ location __PATH__/ { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - location __PATH__/ws/ { + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; +} + +location __PATH__/ws/ { proxy_pass http://wsbackend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; } - - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; -} From 9845c747966ffd4389b96acd1f390d3060b0a10b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 21 Jan 2021 11:54:18 +0100 Subject: [PATCH 27/37] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index a9b7a9e..8977acc 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -23,7 +23,7 @@ location __PATH__/ { } location __PATH__/ws/ { - proxy_pass http://wsbackend; + proxy_pass https://127.0.0.1:__PORT__; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; From d7ed675a105740a8864814cdc250fc45994fc705 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 21 Jan 2021 12:14:02 +0100 Subject: [PATCH 28/37] Update nginx.conf --- conf/nginx.conf | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 8977acc..af8e491 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -14,18 +14,8 @@ location __PATH__/ { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; + # WebSocket support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; } - -location __PATH__/ws/ { - proxy_pass https://127.0.0.1:__PORT__; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header Host $host; - } From 8f3fff2aeb5f85354fb8600352a40cf5380bc6bb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 15:48:09 +0100 Subject: [PATCH 29/37] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 155b2c8..1963f1f 100755 --- a/scripts/install +++ b/scripts/install @@ -257,6 +257,7 @@ chown -R $app:root $final_path chmod -R 755 $final_path chown -R $app:root /var/log/$app chown -R $app:root /etc/$app +chown turnserver:root $coturn_config_path chmod -R u=rwX,g=rX,o= /etc/$app chmod 770 $final_path/Coturn_config_rotate.sh setfacl -R -m user:turnserver:rX /etc/$app From 0b2f7dd1a73cd53752d1379fe3a12e6b6eea404f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 15:58:19 +0100 Subject: [PATCH 30/37] Fix --- scripts/install | 11 ++++------- scripts/remove | 23 +++++++++++------------ scripts/restore | 12 ++++-------- scripts/upgrade | 12 +++++------- sources/Coturn_config_rotate.sh | 12 ++++++++---- 5 files changed, 32 insertions(+), 38 deletions(-) diff --git a/scripts/install b/scripts/install index 1963f1f..9f5abe7 100755 --- a/scripts/install +++ b/scripts/install @@ -188,14 +188,9 @@ ynh_print_ON public_ip4="$(curl ip.yunohost.org)" || true public_ip6="$(curl ipv6.yunohost.org)" || true -if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4" +if ( [[ -n "$public_ip4" ]] && ynh_validate_ip4 --ip_address="$public_ip4" || [[ -n "$public_ip6" ]] && ynh_validate_ip6 --ip_address="$public_ip6" ) then - echo "external-ip=$public_ip4" >> "$coturn_config_path" -fi - -if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6" -then - echo "external-ip=$public_ip6" >> "$coturn_config_path" + echo "external-ip=${public_ip4}/${public_ip6}" >> "$coturn_config_path" fi ynh_store_file_checksum --file="$coturn_config_path" @@ -245,6 +240,8 @@ ynh_use_logrotate --logfile "/var/log/$app" # For any update do it in all files cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh +ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" +chmod +x $final_path/Coturn_config_rotate.sh #================================================= # GENERIC FINALIZATION diff --git a/scripts/remove b/scripts/remove index e297f87..220f571 100755 --- a/scripts/remove +++ b/scripts/remove @@ -87,18 +87,17 @@ ynh_remove_logrotate # CLOSE A PORT #================================================= -closeport() { - local port=$1 - if yunohost firewall list | grep -q "\- $turnserver_tls_port$" - then - ynh_script_progression --message="Closing port $turnserver_tls_port port" - ynh_exec_warn_less yunohost firewall disallow Both $turnserver_tls_port - elif yunohost firewall list | grep -q "\- $turnserver_alt_tls_port$" - then - ynh_script_progression --message="Closing port $turnserver_alt_tls_port port" - ynh_exec_warn_less yunohost firewall disallow Both $turnserver_alt_tls_port - fi -} +if yunohost firewall list | grep -q "\- $turnserver_tls_port$" +then + ynh_script_progression --message="Closing port $turnserver_tls_port..." --weight=1 + ynh_exec_warn_less yunohost firewall disallow Both $turnserver_tls_port +fi + +if yunohost firewall list | grep -q "\- $turnserver_alt_tls_port$" +then + ynh_script_progression --message="Closing port $turnserver_alt_tls_port..." --weight=1 + ynh_exec_warn_less yunohost firewall disallow Both $turnserver_alt_tls_port +fi #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index f67b3ab..cfc5da1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -103,7 +103,7 @@ yunohost service add coturn-$app --needs_exposed_ports $turnserver_tls_port #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log" yunohost service add coturn-$app --needs_exposed_ports $turnserver_tls_port #================================================= @@ -158,14 +158,9 @@ ynh_print_ON public_ip4="$(curl ip.yunohost.org)" || true public_ip6="$(curl ipv6.yunohost.org)" || true -if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4" +if ( [[ -n "$public_ip4" ]] && ynh_validate_ip4 --ip_address="$public_ip4" || [[ -n "$public_ip6" ]] && ynh_validate_ip6 --ip_address="$public_ip6" ) then - echo "external-ip=$public_ip4" >> "$coturn_config_path" -fi - -if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6" -then - echo "external-ip=$public_ip6" >> "$coturn_config_path" + echo "external-ip=${public_ip4}/${public_ip6}" >> "$coturn_config_path" fi ynh_store_file_checksum --file="$coturn_config_path" @@ -189,6 +184,7 @@ chown -R $app:root $final_path chmod -R 755 $final_path chown -R $app:root /var/log/$app chown -R $app:root /etc/$app +chown turnserver:root $coturn_config_path chmod -R u=rwX,g=rX,o= /etc/$app chmod 770 $final_path/Coturn_config_rotate.sh setfacl -R -m user:turnserver:rX /etc/$app diff --git a/scripts/upgrade b/scripts/upgrade index ab21e12..23f4e4b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -181,14 +181,9 @@ ynh_print_ON public_ip4="$(curl ip.yunohost.org)" || true public_ip6="$(curl ipv6.yunohost.org)" || true -if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4" +if ( [[ -n "$public_ip4" ]] && ynh_validate_ip4 --ip_address="$public_ip4" || [[ -n "$public_ip6" ]] && ynh_validate_ip6 --ip_address="$public_ip6" ) then - echo "external-ip=$public_ip4" >> "$coturn_config_path" -fi - -if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6" -then - echo "external-ip=$public_ip6" >> "$coturn_config_path" + echo "external-ip=${public_ip4}/${public_ip6}" >> "$coturn_config_path" fi ynh_store_file_checksum --file="$coturn_config_path" @@ -201,6 +196,8 @@ ynh_store_file_checksum --file="$coturn_config_path" # For any update do it in all files cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh +ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" +chmod +x $final_path/Coturn_config_rotate.sh #================================================= # MODIFY A CONFIG FILE @@ -262,6 +259,7 @@ chown -R $app:root $final_path chmod -R 755 $final_path chown -R $app:root /var/log/$app chown -R $app:root /etc/$app +chown turnserver:root $coturn_config_path chmod -R u=rwX,g=rX,o= /etc/$app chmod 770 $final_path/Coturn_config_rotate.sh setfacl -R -m user:turnserver:rX /etc/$app diff --git a/sources/Coturn_config_rotate.sh b/sources/Coturn_config_rotate.sh index 1982f3c..187a5ad 100644 --- a/sources/Coturn_config_rotate.sh +++ b/sources/Coturn_config_rotate.sh @@ -3,19 +3,23 @@ source /usr/share/yunohost/helpers -external_IP_line="external-ip=__IPV4__,__IPV6__" +external_IP_line="external-ip=__IPV4__/__IPV6__" public_ip4="$(curl ip.yunohost.org)" || true public_ip6="$(curl ipv6.yunohost.org)" || true if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4" then - echo "external-ip=$public_ip4" >> "$coturn_config_path" + external_IP_line="${external_IP_line/'__IPV4__'/$public_ip4}" +else + external_IP_line="${external_IP_line/'__IPV4__,'/}" fi if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6" then - echo "external-ip=$public_ip6" >> "$coturn_config_path" + external_IP_line="${external_IP_line/'__IPV6__'/$public_ip6}" +else + external_IP_line="${external_IP_line/',__IPV6__'/}" fi old_config_line=$(egrep "^external-ip=.*\$" "/etc/$app/coturn.conf") @@ -26,7 +30,7 @@ setfacl -R -m user:turnserver:rX /etc/$app if [ "$old_config_line" != "$new_config_line" ] then - systemctl restart coturn-$app.service + systemctl restart coturn-__APP__.service fi exit 0 From 8992b99fd428c3fe35253394488a2e5957fcd612 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 16:01:55 +0100 Subject: [PATCH 31/37] Fix --- scripts/install | 2 +- scripts/restore | 4 ++-- scripts/upgrade | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 9f5abe7..ca8d7b1 100755 --- a/scripts/install +++ b/scripts/install @@ -285,7 +285,7 @@ ynh_script_progression --message="Configuring permissions..." --weight=2 # Make app public if necessary if [ $is_public -eq 1 ] then - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/restore b/scripts/restore index cfc5da1..07af19d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -76,8 +76,8 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei # Create the dedicated user (if not existing) ynh_system_user_create --username=$app -ynh_system_user_create --username=turnserver ssl-cert -#adduser turnserver ssl-cert +ynh_system_user_create --username=turnserver +adduser turnserver ssl-cert #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 23f4e4b..a872b6e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,7 +68,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=3 -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="/var/log/$app/$app.log" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE From d9019d43e66e82fb529a7fb101daa9d1c05b9e23 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 16:02:23 +0100 Subject: [PATCH 32/37] Update Coturn_config_rotate.sh --- sources/Coturn_config_rotate.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/Coturn_config_rotate.sh b/sources/Coturn_config_rotate.sh index 187a5ad..edd65ca 100644 --- a/sources/Coturn_config_rotate.sh +++ b/sources/Coturn_config_rotate.sh @@ -1,6 +1,5 @@ #!/bin/bash - source /usr/share/yunohost/helpers external_IP_line="external-ip=__IPV4__/__IPV6__" From 3dfc6f1a0fbd2fdfa10f1c3e7ab79cf5917ebd3e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 16:02:47 +0100 Subject: [PATCH 33/37] Update pull_request_template.md --- pull_request_template.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pull_request_template.md b/pull_request_template.md index 69ce5a0..6c28fc5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -10,3 +10,7 @@ - [ ] Fix or enhancement tested. - [ ] Upgrade from last version tested. - [ ] Can be reviewed and tested. + +## Package_check results +--- +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* From 45fdb2c96408cc96669cbd8ab945bdf88f0479c7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 16:34:24 +0100 Subject: [PATCH 34/37] Update Coturn_config_rotate.sh --- sources/Coturn_config_rotate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/Coturn_config_rotate.sh b/sources/Coturn_config_rotate.sh index edd65ca..b0c554a 100644 --- a/sources/Coturn_config_rotate.sh +++ b/sources/Coturn_config_rotate.sh @@ -11,14 +11,14 @@ if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4" then external_IP_line="${external_IP_line/'__IPV4__'/$public_ip4}" else - external_IP_line="${external_IP_line/'__IPV4__,'/}" + external_IP_line="${external_IP_line/'__IPV4__/'/}" fi if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6" then external_IP_line="${external_IP_line/'__IPV6__'/$public_ip6}" else - external_IP_line="${external_IP_line/',__IPV6__'/}" + external_IP_line="${external_IP_line/'/__IPV6__'/}" fi old_config_line=$(egrep "^external-ip=.*\$" "/etc/$app/coturn.conf") From 210a944e6ed819afcb519c7bfe504261da0b2407 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 18:05:12 +0100 Subject: [PATCH 35/37] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 274c525..9e441ca 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Videoconferencing server that is easy to deploy", "fr": "Serveur de visioconférence facile à déployer" }, - "version": "0.2~ynh4", + "version": "0.2~ynh5", "url": "https://galene.org/", "license": "MIT", "maintainer": { From 8ce109e5c2ff1be60d09949c92c5e0a86e4ff06e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 20:01:04 +0100 Subject: [PATCH 36/37] Add description --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index ca8d7b1..0b67811 100755 --- a/scripts/install +++ b/scripts/install @@ -266,7 +266,7 @@ setfacl -R -m user:turnserver:rwX /var/log/$app ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" -yunohost service add coturn-$app --needs_exposed_ports $turnserver_tls_port +yunohost service add coturn-$app --description="Coturn TURN server" --needs_exposed_ports $turnserver_tls_port #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index 07af19d..5687edc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -96,7 +96,7 @@ systemctl enable coturn-$app.service --quiet ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" -yunohost service add coturn-$app --needs_exposed_ports $turnserver_tls_port +yunohost service add coturn-$app --description="Coturn TURN server" --needs_exposed_ports $turnserver_tls_port #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index a872b6e..e00c737 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -279,7 +279,7 @@ ynh_use_logrotate --non-append ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" -yunohost service add coturn-$app --needs_exposed_ports $turnserver_tls_port +yunohost service add coturn-$app --description="Coturn TURN server" --needs_exposed_ports $turnserver_tls_port #================================================= # START SYSTEMD SERVICE From cc8796bfb77619250ba009f2f2bb54b40bb925bd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 20:06:57 +0100 Subject: [PATCH 37/37] Add logs --- scripts/install | 4 ++-- scripts/restore | 6 +++--- scripts/upgrade | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 0b67811..252ee13 100755 --- a/scripts/install +++ b/scripts/install @@ -266,7 +266,7 @@ setfacl -R -m user:turnserver:rwX /var/log/$app ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" -yunohost service add coturn-$app --description="Coturn TURN server" --needs_exposed_ports $turnserver_tls_port +yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_tls_port #================================================= # START SYSTEMD SERVICE @@ -275,7 +275,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action=restart --log_path="/var/log/$app/$app.log" -ynh_systemd_action --service_name=coturn-$app.service --action=restart +ynh_systemd_action --service_name=coturn-$app.service --action=restart --log_path="/var/log/$app/turnserver.log" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 5687edc..6fae177 100755 --- a/scripts/restore +++ b/scripts/restore @@ -96,15 +96,15 @@ systemctl enable coturn-$app.service --quiet ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" -yunohost service add coturn-$app --description="Coturn TURN server" --needs_exposed_ports $turnserver_tls_port +yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_tls_port #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log" -yunohost service add coturn-$app --needs_exposed_ports $turnserver_tls_port +ynh_systemd_action --service_name=$app --action=restart --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=coturn-$app.service --action=restart --log_path="/var/log/$app/turnserver.log" #================================================= # CREATE A DH FILE diff --git a/scripts/upgrade b/scripts/upgrade index e00c737..4ce33f6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -279,14 +279,14 @@ ynh_use_logrotate --non-append ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" -yunohost service add coturn-$app --description="Coturn TURN server" --needs_exposed_ports $turnserver_tls_port +yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_tls_port #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=coturn-$app.service --action=restart +ynh_systemd_action --service_name=coturn-$app.service --action=restart --log_path="/var/log/$app/turnserver.log" ynh_systemd_action --service_name=$app --action=restart --log_path="/var/log/$app/$app.log" #=================================================