From 0d2025838c93a4cb9dfd4a022a3fa7dbd349236c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 23 Apr 2021 08:21:46 +0200 Subject: [PATCH 1/7] Cleaning up --- README.md | 4 ++-- README_fr.md | 4 ++-- conf/mumble-server.ini | 6 +++--- manifest.json | 6 +----- scripts/install | 21 ++++++--------------- scripts/remove | 2 +- scripts/upgrade | 14 +------------- 7 files changed, 16 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 3c6f3ec..6d480c1 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ This package installs the Debian package and configures it with given settings. #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mumbleserver%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mumbleserver/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mumbleserver%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mumbleserver/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mumbleserver.svg)](https://ci-apps.yunohost.org/ci/apps/mumbleserver/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mumbleserver.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mumbleserver/) ## Limitations diff --git a/README_fr.md b/README_fr.md index cfe8323..95535a8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -37,8 +37,8 @@ mumbleserver_ynh installe le paquet Debian et le configure avec les paramètres #### Architectures supportées -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mumbleserver%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mumbleserver/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mumbleserver%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mumbleserver/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mumbleserver.svg)](https://ci-apps.yunohost.org/ci/apps/mumbleserver/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mumbleserver.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mumbleserver/) ## Limitations diff --git a/conf/mumble-server.ini b/conf/mumble-server.ini index 7111565..8778834 100644 --- a/conf/mumble-server.ini +++ b/conf/mumble-server.ini @@ -85,7 +85,7 @@ pidfile=/var/run/mumble-server/__APP__.pid # configure it here than through D-Bus or Ice. # # Welcome message sent to clients when they connect. -welcometext="__WELCOME__" +welcometext="__WELCOMETEXT__" # Port to bind TCP and UDP sockets to. port=__PORT__ @@ -95,7 +95,7 @@ port=__PORT__ #host= # Password to join server. -serverpassword=__SRV_PWD__ +serverpassword=__SERVER_PASSWORD__ # Maximum bandwidth (in bits per second) clients are allowed # to send speech at. @@ -143,7 +143,7 @@ users=100 # addresses. # Only uncomment the 'registerName' parameter if you wish to give your "Root" channel a custom name. # -registerName=__REGISTER__ +registerName=__REGISTERNAME__ #registerPassword=secret #registerUrl=http://mumble.sourceforge.net/ #registerHostname= diff --git a/manifest.json b/manifest.json index bc23f41..a25cf83 100644 --- a/manifest.json +++ b/manifest.json @@ -18,7 +18,7 @@ "email": "jean-baptiste@holcroft.fr" }], "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ @@ -28,10 +28,6 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain (used to select the correct certificate)", - "fr": "Choisissez un domaine (utilisé pour sélectionner le bon certificat)" - }, "example": "domain.org" }, { diff --git a/scripts/install b/scripts/install index 6201b00..55a8247 100644 --- a/scripts/install +++ b/scripts/install @@ -59,13 +59,14 @@ ynh_app_setting_set --app=$app --key=instance_id --value="$instance_id" #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Configuring firewall..." --weight=1 +ynh_script_progression --message="Finding an available port..." --weight=1 -port=$(ynh_find_port 64738) +port=$(ynh_find_port --port=64738) ynh_app_setting_set --app=$app --key=port --value=$port -# Open port in firewall -yunohost firewall allow Both "$port" +# Open the port +ynh_script_progression --message="Configuring firewall..." --weight=1 +ynh_exec_warn_less yunohost firewall allow Both TCP $port #================================================= # INSTALL DEPENDENCIES @@ -87,17 +88,7 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Configuring with given settings mumble_conf="$final_path/mumble-server.ini" -cp ../conf/mumble-server.ini "$mumble_conf" - -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$mumble_conf" -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$mumble_conf" -ynh_replace_string --match_string="__WELCOME__" --replace_string="$welcometext" --target_file="$mumble_conf" -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$mumble_conf" -ynh_replace_string --match_string="__SRV_PWD__" --replace_string="$server_password" --target_file="$mumble_conf" -ynh_replace_string --match_string="__REGISTER__" --replace_string="$registerName" --target_file="$mumble_conf" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$mumble_conf" - -ynh_store_file_checksum "$mumble_conf" +ynh_add_config --template="../conf/mumble-server.ini" --destination="$mumble_conf" #================================================= # SETUP SYSTEMD diff --git a/scripts/remove b/scripts/remove index 1a65607..5ea2a88 100644 --- a/scripts/remove +++ b/scripts/remove @@ -26,7 +26,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # REMOVE SERVICE FROM ADMIN PANEL #================================================= -# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) +# 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 then ynh_script_progression --message="Removing $app service integration..." --weight=1 diff --git a/scripts/upgrade b/scripts/upgrade index a045d9c..eec3247 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,19 +133,7 @@ mkdir -p $final_path # Configuring with given settings mumble_conf="$final_path/mumble-server.ini" -ynh_backup_if_checksum_is_different "$mumble_conf" - -cp ../conf/mumble-server.ini "$mumble_conf" - -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$mumble_conf" -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$mumble_conf" -ynh_replace_string --match_string="__WELCOME__" --replace_string="$welcometext" --target_file="$mumble_conf" -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$mumble_conf" -ynh_replace_string --match_string="__SRV_PWD__" --replace_string="$server_password" --target_file="$mumble_conf" -ynh_replace_string --match_string="__REGISTER__" --replace_string="$registerName" --target_file="$mumble_conf" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$mumble_conf" - -ynh_store_file_checksum "$mumble_conf" +ynh_add_config --template="../conf/mumble-server.ini" --destination="$mumble_conf" #================================================= # SETUP SYSTEMD From bec71c4265a03e44c53c0702e59b2e78b20afd7d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 23 Apr 2021 18:58:33 +0200 Subject: [PATCH 2/7] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 55a8247..2f66ae1 100644 --- a/scripts/install +++ b/scripts/install @@ -66,7 +66,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port # Open the port ynh_script_progression --message="Configuring firewall..." --weight=1 -ynh_exec_warn_less yunohost firewall allow Both TCP $port +ynh_exec_warn_less yunohost firewall allow Both $port #================================================= # INSTALL DEPENDENCIES From 8499925c15fac80f48f971470e20fe3569f4b21a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 23 Apr 2021 19:07:09 +0200 Subject: [PATCH 3/7] Fix name --- scripts/install | 4 ++-- scripts/upgrade | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 2f66ae1..b2c343e 100644 --- a/scripts/install +++ b/scripts/install @@ -26,7 +26,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN app=$YNH_APP_INSTANCE_NAME welcometext=$YNH_APP_ARG_WELCOMETEXT -registerName=$YNH_APP_ARG_REGISTERNAME +registername=$YNH_APP_ARG_REGISTERNAME instance_id=$YNH_APP_INSTANCE_NUMBER server_password=$(ynh_string_random) @@ -51,7 +51,7 @@ ynh_app_setting_set --app=$app --key=no_sso --value="true" ynh_app_setting_set --app=$app --key=server_password --value="$server_password" ynh_app_setting_set --app=$app --key=su_passwd --value="$su_passwd" ynh_app_setting_set --app=$app --key=welcometext --value="$welcometext" -ynh_app_setting_set --app=$app --key=registerName --value="$registerName" +ynh_app_setting_set --app=$app --key=registerName --value="$registername" ynh_app_setting_set --app=$app --key=instance_id --value="$instance_id" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index eec3247..67de972 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,7 @@ no_sso=$(ynh_app_setting_get --app=$app --key=no_sso) server_password=$(ynh_app_setting_get --app=$app --key=server_password) su_passwd=$(ynh_app_setting_get --app=$app --key=su_passwd) welcometext=$(ynh_app_setting_get --app=$app --key=welcometext) -registerName=$(ynh_app_setting_get --app=$app --key=registerName) +registername=$(ynh_app_setting_get --app=$app --key=registername) port=$(ynh_app_setting_get --app=$app --key=port) final_path=$(ynh_app_setting_get --app=$app --key=final_path) instance_id=$(ynh_app_setting_get --app=$app --key=instance_id) @@ -55,9 +55,9 @@ if [ -z "$server_password" ]; then | grep "welcometext=" \ | sed "s/welcometext=//") - registerName=$(cat "$old_mumble_conf" \ + registername=$(cat "$old_mumble_conf" \ | grep "registerName=" \ - | sed "s/registerName=//") + | sed "s/registername=//") # we don't know what the previous password was, let's regenerate it su_passwd=$(ynh_string_random) @@ -69,7 +69,7 @@ if [ -z "$server_password" ]; then ynh_app_setting_set --app=$app --key=server_password --value=$server_password ynh_app_setting_set --app=$app --key=welcometext --value=$welcometext - ynh_app_setting_set --app=$app --key=registerName --value=$registerName + ynh_app_setting_set --app=$app --key=registerName --value=$registername ynh_app_setting_set --app=$app --key=su_passwd --value=$su_passwd ynh_app_setting_set --app=$app --key=domain --value=$domain From 3e5a5fa48b8e3bb44e1b4edf13366dec1dbad2f1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 23 Apr 2021 19:11:25 +0200 Subject: [PATCH 4/7] Fix --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index b2c343e..a0d6ab4 100644 --- a/scripts/install +++ b/scripts/install @@ -151,7 +151,7 @@ Port : $port Password to join server: $server_password SuperUser Password : $su_passwd Welcome text : $welcometext -Root channel (your mumble server name): $registerName +Root channel (your mumble server name): $registername Final path (where to find your files) : $final_path Mumble configuration file : $mumble_conf diff --git a/scripts/upgrade b/scripts/upgrade index 67de972..e9c999f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -198,7 +198,7 @@ Port : $port Password to join server: $server_password SuperUser Password : $su_passwd Welcome text : $welcometext -Root channel (your mumble server name): $registerName +Root channel (your mumble server name): $registername Final path (where to find your files) : $final_path Mumble configuration file : $mumble_conf From 562f49ae0a44f8b52d03d39ee4913d9aebe49232 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 23 Apr 2021 19:16:12 +0200 Subject: [PATCH 5/7] Fix --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index a0d6ab4..3f7c8b9 100644 --- a/scripts/install +++ b/scripts/install @@ -74,7 +74,7 @@ ynh_exec_warn_less yunohost firewall allow Both $port ynh_script_progression --message="Installing dependencies..." --weight=4 # Install Mumble Debian package via apt -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # SPECIFIC SETUP diff --git a/scripts/upgrade b/scripts/upgrade index e9c999f..e30e721 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -120,7 +120,7 @@ ynh_abort_if_errors ynh_script_progression --message="Upgrading dependencies..." --weight=6 # Install Mumble Debian package via apt -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # SPECIFIC UPGRADE From 2c99d32d63fcb247e19542af75c1b61cfb89c503 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 23 Apr 2021 19:24:28 +0200 Subject: [PATCH 6/7] Update check_process --- check_process | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index c9ec543..732c103 100644 --- a/check_process +++ b/check_process @@ -12,6 +12,7 @@ setup_private=0 setup_public=0 upgrade=1 + upgrade=1 from_commit=d9ece341d532bd5eac9af9ce191da7b62d1e8bb1 backup_restore=1 multi_instance=1 wrong_user=0 @@ -21,5 +22,5 @@ Email= Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. + ; commit=d9ece341d532bd5eac9af9ce191da7b62d1e8bb1 + name=Merge pull request #40 from YunoHost-Apps/testing From 89ccef579c755bfb62e4a24245addc8fdc1e1d8e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 24 Apr 2021 23:57:50 +0200 Subject: [PATCH 7/7] Fix links --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d480c1..2914f42 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ *[Lire ce readme en français.](./README_fr.md)* > *This package allows you to install Mumble server quickly and simply on a YunoHost server. -If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* +If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* ## Overview Mumble is a free, open source, low latency, high quality voice chat application. Mumble was the first VoIP application to establish true low latency voice communication over a decade ago. But low latency and gaming are not the only use cases it shines in. diff --git a/README_fr.md b/README_fr.md index 95535a8..126c1dc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,7 +6,7 @@ *[Read this readme in english.](./README.md)* > *Ce package vous permet d'installer Mumble server rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* +Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) pour apprendre comment l'installer.* ## Vue d'ensemble Mumble est une application de chat vocal gratuite, open source, à faible latence et de haute qualité. Mumble a été la première application VoIP à établir une véritable communication vocale à faible latence il y a plus de dix ans. Mais la faible latence et le jeu ne sont pas les seuls cas d'utilisation dans lesquels il brille.