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 #47 from YunoHost-Apps/upgrade

Apply last example_ynh
This commit is contained in:
yalh76 2022-06-22 08:32:49 +02:00 committed by GitHub
commit 94a322e870
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 175 additions and 133 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Mumble Server for YunoHost
[![Integration level](https://dash.yunohost.org/integration/mumbleserver.svg)](https://dash.yunohost.org/appci/app/mumbleserver) ![](https://ci-apps.yunohost.org/ci/badges/mumbleserver.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mumbleserver.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/mumbleserver.svg)](https://dash.yunohost.org/appci/app/mumbleserver) ![Working status](https://ci-apps.yunohost.org/ci/badges/mumbleserver.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mumbleserver.maintain.svg)
[![Install Mumble Server with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mumbleserver)
*[Lire ce readme en français.](./README_fr.md)*
@ -15,41 +15,47 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview
Low-latency, high quality voice chat software (VoIP)
**Shipped version:** 1.3.0~ynh2
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.
**Shipped version:** 1.3.0~ynh3
## Screenshots
![](./doc/screenshots/Mumble.png)
![Screenshot of Mumble Server](./doc/screenshots/Mumble.png)
## Disclaimers / important information
#### Setup
## Setup
This package installs the Debian package and configures it with given settings. Password and other usefull information will be sent by email after installation.
- [Add the admin](http://wiki.mumble.info/wiki/Murmurguide#Connecting_to_Murmur_Server)
## Config
If you need to change password of the server/superuser
1- edit `/var/www/mumbleserver/mumble-server.ini`
2- remove (or change) the password for serverpassword=
3- restart mumbleserver
## Documentation and resources
* Official app website: https://mumble.info
* Official admin documentation: https://wiki.mumble.info/wiki/Main_Page
* Upstream app code repository: https://github.com/mumble-voip/mumble
* YunoHost documentation for this app: https://yunohost.org/app_mumbleserver
* Report a bug: https://github.com/YunoHost-Apps/mumbleserver_ynh/issues
* Official app website: <https://mumble.info>
* Official admin documentation: <https://wiki.mumble.info/wiki/Main_Page>
* Upstream app code repository: <https://github.com/mumble-voip/mumble>
* YunoHost documentation for this app: <https://yunohost.org/app_mumbleserver>
* Report a bug: <https://github.com/YunoHost-Apps/mumbleserver_ynh/issues>
## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
or
sudo yunohost app upgrade mumbleserver -u https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,25 +1,27 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Mumble Server pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/mumbleserver.svg)](https://dash.yunohost.org/appci/app/mumbleserver) ![](https://ci-apps.yunohost.org/ci/badges/mumbleserver.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mumbleserver.maintain.svg)
[![Niveau d'intégration](https://dash.yunohost.org/integration/mumbleserver.svg)](https://dash.yunohost.org/appci/app/mumbleserver) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mumbleserver.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mumbleserver.maintain.svg)
[![Installer Mumble Server avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mumbleserver)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Mumble Server rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
## Vue d'ensemble
Logiciel libre de voix sur IP (VoIP)
**Version incluse :** 1.3.0~ynh2
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.
**Version incluse :** 1.3.0~ynh3
## Captures d'écran
![](./doc/screenshots/Mumble.png)
![Capture d'écran de Mumble Server](./doc/screenshots/Mumble.png)
## Avertissements / informations importantes
@ -29,23 +31,30 @@ mumbleserver_ynh installe le paquet Debian et le configure avec les paramètres
- [Ajouter l'administrateur](http://wiki.mumble.info/wiki/Murmurguide#Connecting_to_Murmur_Server)
## Configuration
Si vous devez changer le mot de passe du serveur/superutilisateur
1- éditez `/var/www/mumbleserver/mumble-server.ini`
2- supprimer (ou changer) le mot de passe pour serverpassword=
3- redémarrer mumbleserver
## Documentations et ressources
* Site officiel de l'app : https://mumble.info
* Documentation officielle de l'admin : https://wiki.mumble.info/wiki/Main_Page
* Dépôt de code officiel de l'app : https://github.com/mumble-voip/mumble
* Documentation YunoHost pour cette app : https://yunohost.org/app_mumbleserver
* Signaler un bug : https://github.com/YunoHost-Apps/mumbleserver_ynh/issues
* Site officiel de l'app : <https://mumble.info>
* Documentation officielle de l'admin : <https://wiki.mumble.info/wiki/Main_Page>
* Dépôt de code officiel de l'app : <https://github.com/mumble-voip/mumble>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_mumbleserver>
* Signaler un bug : <https://github.com/YunoHost-Apps/mumbleserver_ynh/issues>
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
ou
sudo yunohost app upgrade mumbleserver -u https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -12,12 +12,14 @@
setup_private=0
setup_public=0
upgrade=1
# 1.3.0~ynh1
upgrade=1 from_commit=d9ece341d532bd5eac9af9ce191da7b62d1e8bb1
# 1.3.0~ynh2
upgrade=1 from_commit=fc6ca3fa6abe234314089fd58ef884759ebe4fd9
backup_restore=1
multi_instance=1
port_already_use=0
change_url=0
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=d9ece341d532bd5eac9af9ce191da7b62d1e8bb1
name=Merge pull request #40 from YunoHost-Apps/testing

1
doc/DESCRIPTION.md Normal file
View file

@ -0,0 +1 @@
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.

1
doc/DESCRIPTION_fr.md Normal file
View file

@ -0,0 +1 @@
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.

View file

@ -1,5 +1,11 @@
#### Setup
## Setup
This package installs the Debian package and configures it with given settings. Password and other usefull information will be sent by email after installation.
- [Add the admin](http://wiki.mumble.info/wiki/Murmurguide#Connecting_to_Murmur_Server)
## Config
If you need to change password of the server/superuser
1- edit `/var/www/mumbleserver/mumble-server.ini`
2- remove (or change) the password for serverpassword=
3- restart mumbleserver

View file

@ -3,3 +3,9 @@
mumbleserver_ynh installe le paquet Debian et le configure avec les paramètres donnés. Le mot de passe et d'autres informations utiles sont envoyés par email après l'installation.
- [Ajouter l'administrateur](http://wiki.mumble.info/wiki/Murmurguide#Connecting_to_Murmur_Server)
## Configuration
Si vous devez changer le mot de passe du serveur/superutilisateur
1- éditez `/var/www/mumbleserver/mumble-server.ini`
2- supprimer (ou changer) le mot de passe pour serverpassword=
3- redémarrer mumbleserver

View file

@ -6,7 +6,7 @@
"en": "Low-latency, high quality voice chat software (VoIP)",
"fr": "Logiciel libre de voix sur IP (VoIP)"
},
"version": "1.3.0~ynh2",
"version": "1.3.0~ynh3",
"url": "https://mumble.info",
"upstream": {
"license": "BSD-3-Clause",
@ -30,7 +30,7 @@
"services": [
],
"arguments": {
"install" : [
"install": [
{
"name": "domain",
"type": "domain"

View file

@ -6,6 +6,7 @@
# IMPORT GENERIC HELPERS
#=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
@ -13,6 +14,7 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
@ -29,8 +31,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# STANDARD BACKUP STEPS
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================

View file

@ -15,6 +15,9 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup () {
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
@ -22,13 +25,13 @@ ynh_abort_if_errors
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
# Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN
app=$YNH_APP_INSTANCE_NAME
welcometext=$YNH_APP_ARG_WELCOMETEXT
registername=$YNH_APP_ARG_REGISTERNAME
instance_id=$YNH_APP_INSTANCE_NUMBER
app=$YNH_APP_INSTANCE_NAME
server_password=$(ynh_string_random)
su_passwd=$(ynh_string_random)
@ -38,7 +41,7 @@ su_passwd=$(ynh_string_random)
ynh_script_progression --message="Validating installation parameters..." --weight=1
final_path=/var/www/$app
test ! -e "$final_path" || ynh_die "This path already contains a folder"
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
#=================================================
# STORE SETTINGS FROM MANIFEST
@ -61,6 +64,7 @@ ynh_app_setting_set --app=$app --key=instance_id --value="$instance_id"
#=================================================
ynh_script_progression --message="Finding an available port..." --weight=1
# Find an available port
port=$(ynh_find_port --port=64738)
ynh_app_setting_set --app=$app --key=port --value=$port
@ -73,14 +77,14 @@ ynh_exec_warn_less yunohost firewall allow Both $port
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=4
# Install Mumble Debian package via apt
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# SPECIFIC SETUP
#=================================================
# mumble server conf.ini
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..."
mkdir -p "$final_path"
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
@ -90,19 +94,6 @@ mumble_conf="$final_path/mumble-server.ini"
ynh_add_config --template="../conf/mumble-server.ini" --destination="$mumble_conf"
#=================================================
# SETUP SYSTEMD
#=================================================
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
chmod -R 770 "$final_path"
chown -R :mumble-server "$final_path"
@ -128,12 +119,21 @@ ynh_exec_warn_less murmurd -ini "$mumble_conf" -supw "$su_passwd" "$instance_id"
systemctl stop mumble-server
systemctl disable mumble-server --quiet
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
# Add Mumble as a YunoHost service
yunohost service add $app --description="Mumble server" --log="/var/log/mumble-server/$app.log" --needs_exposed_ports="$port"
#=================================================

View file

@ -23,7 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# STANDARD REMOVE
#=================================================
# REMOVE SERVICE FROM ADMIN PANEL
# REMOVE SERVICE INTEGRATION IN YUNOHOST
#=================================================
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
@ -41,14 +41,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================
@ -57,21 +49,30 @@ ynh_script_progression --message="Removing app main directory..." --weight=2
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# CLOSE A PORT
#=================================================
if yunohost firewall list | grep -q "\- $port$"
then
ynh_script_progression --message="Close port $port" --weight=1
ynh_script_progression --message="Closing port $port..." --weight=1
ynh_exec_warn_less yunohost firewall disallow Both $port
fi
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE OTHER FILES
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..."
ynh_secure_remove --file="/var/log/mumble-server/$app.log"

View file

@ -6,6 +6,7 @@
# IMPORT GENERIC HELPERS
#=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
@ -13,6 +14,10 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup () {
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
@ -30,7 +35,8 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=1
test ! -d "$final_path" || ynh_die "There is already a directory: $final_path "
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS
@ -72,14 +78,6 @@ usermod --append --groups ssl-cert mumble-server
systemctl stop mumble-server
systemctl disable mumble-server --quiet
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
# Add Mumble as a YunoHost service
yunohost service add $app --description="Mumble server" --log="/var/log/mumble-server/$app.log" --needs_exposed_ports="$port"
#=================================================
# RESTORE SYSTEMD
#=================================================
@ -88,6 +86,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="Mumble server" --log="/var/log/mumble-server/$app.log" --needs_exposed_ports="$port"
#=================================================
# START SYSTEMD SERVICE
#=================================================

View file

@ -29,9 +29,34 @@ instance_id=$(ynh_app_setting_get --app=$app --key=instance_id)
#=================================================
# CHECK VERSION
#=================================================
ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
ynh_clean_check_starting
# Restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop"
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
@ -106,32 +131,16 @@ if [ -z "$registername" ]; then
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# INSTALL DEPENDENCIES
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=6
# Install Mumble Debian package via apt
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# SPECIFIC UPGRADE
#=================================================
# mumble server conf.ini
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
@ -142,20 +151,6 @@ mumble_conf="$final_path/mumble-server.ini"
ynh_add_config --template="../conf/mumble-server.ini" --destination="$mumble_conf"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
chmod -R 770 "$final_path"
chown -R :mumble-server "$final_path"
@ -181,7 +176,17 @@ systemctl stop mumble-server
systemctl disable mumble-server --quiet
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
@ -211,7 +216,7 @@ Final path (where to find your files) : $final_path
Mumble configuration file : $mumble_conf
Note about config file: this package will regenerate the config file on upgrade.
If you changed it manually and upgrade mumble, you'll find a backup in $final_path.
If you changed it manually and upgrade mumble, you'll find a backup in /home/yunohost.conf/backup/var/www/mumbleserver/.
Are you facing an issue, want to improve this app or say thank you?
Please open a new issue in this project: https://github.com/YunoHost-Apps/mumbleserver_ynh