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