1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mumbleserver_ynh.git synced 2024-09-03 19:46:03 +02:00

Merge pull request #41 from YunoHost-Apps/patch

Cleaning up
This commit is contained in:
Éric Gaspar 2021-05-01 09:47:19 +02:00 committed by GitHub
commit 9549c26896
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 50 deletions

View file

@ -6,7 +6,7 @@
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
> *This package allows you to install Mumble server quickly and simply on a YunoHost server. > *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 ## 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. 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.
@ -37,8 +37,8 @@ This package installs the Debian package and configures it with given settings.
#### Supported architectures #### 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/) * 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%20%28Apps%29.svg)](https://ci-apps-arm.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 ## Limitations

View file

@ -6,7 +6,7 @@
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
> *Ce package vous permet d'installer Mumble server rapidement et simplement sur un serveur YunoHost. > *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 ## 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. 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.
@ -37,8 +37,8 @@ mumbleserver_ynh installe le paquet Debian et le configure avec les paramètres
#### Architectures supportées #### 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/) * 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%20%28Apps%29.svg)](https://ci-apps-arm.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 ## Limitations

View file

@ -12,6 +12,7 @@
setup_private=0 setup_private=0
setup_public=0 setup_public=0
upgrade=1 upgrade=1
upgrade=1 from_commit=d9ece341d532bd5eac9af9ce191da7b62d1e8bb1
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
wrong_user=0 wrong_user=0
@ -21,5 +22,5 @@
Email= Email=
Notification=none Notification=none
;;; Upgrade options ;;; Upgrade options
; commit=CommitHash ; commit=d9ece341d532bd5eac9af9ce191da7b62d1e8bb1
name=Name and date of the commit. name=Merge pull request #40 from YunoHost-Apps/testing

View file

@ -85,7 +85,7 @@ pidfile=/var/run/mumble-server/__APP__.pid
# configure it here than through D-Bus or Ice. # configure it here than through D-Bus or Ice.
# #
# Welcome message sent to clients when they connect. # Welcome message sent to clients when they connect.
welcometext="__WELCOME__" welcometext="__WELCOMETEXT__"
# Port to bind TCP and UDP sockets to. # Port to bind TCP and UDP sockets to.
port=__PORT__ port=__PORT__
@ -95,7 +95,7 @@ port=__PORT__
#host= #host=
# Password to join server. # Password to join server.
serverpassword=__SRV_PWD__ serverpassword=__SERVER_PASSWORD__
# Maximum bandwidth (in bits per second) clients are allowed # Maximum bandwidth (in bits per second) clients are allowed
# to send speech at. # to send speech at.
@ -143,7 +143,7 @@ users=100
# addresses. # addresses.
# Only uncomment the 'registerName' parameter if you wish to give your "Root" channel a custom name. # Only uncomment the 'registerName' parameter if you wish to give your "Root" channel a custom name.
# #
registerName=__REGISTER__ registerName=__REGISTERNAME__
#registerPassword=secret #registerPassword=secret
#registerUrl=http://mumble.sourceforge.net/ #registerUrl=http://mumble.sourceforge.net/
#registerHostname= #registerHostname=

View file

@ -26,7 +26,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
welcometext=$YNH_APP_ARG_WELCOMETEXT welcometext=$YNH_APP_ARG_WELCOMETEXT
registerName=$YNH_APP_ARG_REGISTERNAME registername=$YNH_APP_ARG_REGISTERNAME
instance_id=$YNH_APP_INSTANCE_NUMBER instance_id=$YNH_APP_INSTANCE_NUMBER
server_password=$(ynh_string_random) 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=server_password --value="$server_password"
ynh_app_setting_set --app=$app --key=su_passwd --value="$su_passwd" 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=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" ynh_app_setting_set --app=$app --key=instance_id --value="$instance_id"
#================================================= #=================================================
@ -59,13 +59,14 @@ ynh_app_setting_set --app=$app --key=instance_id --value="$instance_id"
#================================================= #=================================================
# FIND AND OPEN A PORT # 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 ynh_app_setting_set --app=$app --key=port --value=$port
# Open port in firewall # Open the port
yunohost firewall allow Both "$port" ynh_script_progression --message="Configuring firewall..." --weight=1
ynh_exec_warn_less yunohost firewall allow Both $port
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
@ -73,7 +74,7 @@ yunohost firewall allow Both "$port"
ynh_script_progression --message="Installing dependencies..." --weight=4 ynh_script_progression --message="Installing dependencies..." --weight=4
# Install Mumble Debian package via apt # Install Mumble Debian package via apt
ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
@ -87,17 +88,7 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Configuring with given settings # Configuring with given settings
mumble_conf="$final_path/mumble-server.ini" mumble_conf="$final_path/mumble-server.ini"
cp ../conf/mumble-server.ini "$mumble_conf" ynh_add_config --template="../conf/mumble-server.ini" --destination="$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"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
@ -160,7 +151,7 @@ Port : $port
Password to join server: $server_password Password to join server: $server_password
SuperUser Password : $su_passwd SuperUser Password : $su_passwd
Welcome text : $welcometext 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 Final path (where to find your files) : $final_path
Mumble configuration file : $mumble_conf Mumble configuration file : $mumble_conf

View file

@ -26,7 +26,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# REMOVE SERVICE FROM ADMIN PANEL # 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 if ynh_exec_warn_less yunohost service status $app >/dev/null
then then
ynh_script_progression --message="Removing $app service integration..." --weight=1 ynh_script_progression --message="Removing $app service integration..." --weight=1

View file

@ -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) server_password=$(ynh_app_setting_get --app=$app --key=server_password)
su_passwd=$(ynh_app_setting_get --app=$app --key=su_passwd) su_passwd=$(ynh_app_setting_get --app=$app --key=su_passwd)
welcometext=$(ynh_app_setting_get --app=$app --key=welcometext) 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) port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
instance_id=$(ynh_app_setting_get --app=$app --key=instance_id) instance_id=$(ynh_app_setting_get --app=$app --key=instance_id)
@ -55,9 +55,9 @@ if [ -z "$server_password" ]; then
| grep "welcometext=" \ | grep "welcometext=" \
| sed "s/welcometext=//") | sed "s/welcometext=//")
registerName=$(cat "$old_mumble_conf" \ registername=$(cat "$old_mumble_conf" \
| grep "registerName=" \ | grep "registerName=" \
| sed "s/registerName=//") | sed "s/registername=//")
# we don't know what the previous password was, let's regenerate it # we don't know what the previous password was, let's regenerate it
su_passwd=$(ynh_string_random) 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=server_password --value=$server_password
ynh_app_setting_set --app=$app --key=welcometext --value=$welcometext 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=su_passwd --value=$su_passwd
ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=domain --value=$domain
@ -120,7 +120,7 @@ ynh_abort_if_errors
ynh_script_progression --message="Upgrading dependencies..." --weight=6 ynh_script_progression --message="Upgrading dependencies..." --weight=6
# Install Mumble Debian package via apt # Install Mumble Debian package via apt
ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# SPECIFIC UPGRADE # SPECIFIC UPGRADE
@ -133,19 +133,7 @@ mkdir -p $final_path
# Configuring with given settings # Configuring with given settings
mumble_conf="$final_path/mumble-server.ini" mumble_conf="$final_path/mumble-server.ini"
ynh_backup_if_checksum_is_different "$mumble_conf" ynh_add_config --template="../conf/mumble-server.ini" --destination="$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"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
@ -210,7 +198,7 @@ Port : $port
Password to join server: $server_password Password to join server: $server_password
SuperUser Password : $su_passwd SuperUser Password : $su_passwd
Welcome text : $welcometext 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 Final path (where to find your files) : $final_path
Mumble configuration file : $mumble_conf Mumble configuration file : $mumble_conf