mirror of
https://github.com/YunoHost-Apps/mumbleserver_ynh.git
synced 2024-09-03 19:46:03 +02:00
Merge pull request #48 from YunoHost-Apps/testing
Apply last example_ynh
This commit is contained in:
commit
5bd5c6ab9f
13 changed files with 182 additions and 142 deletions
34
README.md
34
README.md
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
||||||
|
|
||||||
# Mumble Server for YunoHost
|
# Mumble Server for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/mumbleserver)  
|
[](https://dash.yunohost.org/appci/app/mumbleserver)  
|
||||||
[](https://install-app.yunohost.org/?app=mumbleserver)
|
[](https://install-app.yunohost.org/?app=mumbleserver)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[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
|
## Overview
|
||||||
|
|
||||||
Low-latency, high quality voice chat software (VoIP)
|
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~ynh2
|
|
||||||
|
|
||||||
|
|
||||||
|
**Shipped version:** 1.3.0~ynh3
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Disclaimers / important information
|
## 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 to you after installation.
|
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)
|
- [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
|
## Documentation and resources
|
||||||
|
|
||||||
* Official app website: https://mumble.info
|
* Official app website: <https://mumble.info>
|
||||||
* Official admin documentation: https://wiki.mumble.info/wiki/Main_Page
|
* Official admin documentation: <https://wiki.mumble.info/wiki/Main_Page>
|
||||||
* Upstream app code repository: https://github.com/mumble-voip/mumble
|
* Upstream app code repository: <https://github.com/mumble-voip/mumble>
|
||||||
* YunoHost documentation for this app: https://yunohost.org/app_mumbleserver
|
* YunoHost documentation for this app: <https://yunohost.org/app_mumbleserver>
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/mumbleserver_ynh/issues
|
* Report a bug: <https://github.com/YunoHost-Apps/mumbleserver_ynh/issues>
|
||||||
|
|
||||||
## Developer info
|
## Developer info
|
||||||
|
|
||||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing).
|
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.
|
To try the testing branch, please proceed like that.
|
||||||
```
|
|
||||||
|
``` bash
|
||||||
sudo yunohost app install https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
|
sudo yunohost app install https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade mumbleserver -u https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
|
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>
|
||||||
|
|
39
README_fr.md
39
README_fr.md
|
@ -1,51 +1,60 @@
|
||||||
|
<!--
|
||||||
|
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
|
# Mumble Server pour YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/mumbleserver)  
|
[](https://dash.yunohost.org/appci/app/mumbleserver)  
|
||||||
[](https://install-app.yunohost.org/?app=mumbleserver)
|
[](https://install-app.yunohost.org/?app=mumbleserver)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[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.
|
> *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.*
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
|
|
||||||
Logiciel libre de voix sur IP (VoIP)
|
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~ynh2
|
|
||||||
|
|
||||||
|
|
||||||
|
**Version incluse :** 1.3.0~ynh3
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Avertissements / informations importantes
|
## Avertissements / informations importantes
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
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 après l'installation.
|
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)
|
- [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
|
## Documentations et ressources
|
||||||
|
|
||||||
* Site officiel de l'app : https://mumble.info
|
* Site officiel de l'app : <https://mumble.info>
|
||||||
* Documentation officielle de l'admin : https://wiki.mumble.info/wiki/Main_Page
|
* 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
|
* 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
|
* Documentation YunoHost pour cette app : <https://yunohost.org/app_mumbleserver>
|
||||||
* Signaler un bug : https://github.com/YunoHost-Apps/mumbleserver_ynh/issues
|
* Signaler un bug : <https://github.com/YunoHost-Apps/mumbleserver_ynh/issues>
|
||||||
|
|
||||||
## Informations pour les développeurs
|
## Informations pour les développeurs
|
||||||
|
|
||||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing).
|
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.
|
Pour essayer la branche testing, procédez comme suit.
|
||||||
```
|
|
||||||
|
``` bash
|
||||||
sudo yunohost app install https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
|
sudo yunohost app install https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
|
||||||
ou
|
ou
|
||||||
sudo yunohost app upgrade mumbleserver -u https://github.com/YunoHost-Apps/mumbleserver_ynh/tree/testing --debug
|
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>
|
||||||
|
|
|
@ -12,12 +12,14 @@
|
||||||
setup_private=0
|
setup_private=0
|
||||||
setup_public=0
|
setup_public=0
|
||||||
upgrade=1
|
upgrade=1
|
||||||
|
# 1.3.0~ynh1
|
||||||
upgrade=1 from_commit=d9ece341d532bd5eac9af9ce191da7b62d1e8bb1
|
upgrade=1 from_commit=d9ece341d532bd5eac9af9ce191da7b62d1e8bb1
|
||||||
|
# 1.3.0~ynh2
|
||||||
|
upgrade=1 from_commit=fc6ca3fa6abe234314089fd58ef884759ebe4fd9
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
|
port_already_use=0
|
||||||
|
change_url=0
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
|
||||||
; commit=d9ece341d532bd5eac9af9ce191da7b62d1e8bb1
|
|
||||||
name=Merge pull request #40 from YunoHost-Apps/testing
|
|
||||||
|
|
1
doc/DESCRIPTION.md
Normal file
1
doc/DESCRIPTION.md
Normal 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
1
doc/DESCRIPTION_fr.md
Normal 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.
|
|
@ -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 to you after installation.
|
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)
|
- [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
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
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 après l'installation.
|
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)
|
- [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
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Low-latency, high quality voice chat software (VoIP)",
|
"en": "Low-latency, high quality voice chat software (VoIP)",
|
||||||
"fr": "Logiciel libre de voix sur IP (VoIP)"
|
"fr": "Logiciel libre de voix sur IP (VoIP)"
|
||||||
},
|
},
|
||||||
"version": "1.3.0~ynh2",
|
"version": "1.3.0~ynh3",
|
||||||
"url": "https://mumble.info",
|
"url": "https://mumble.info",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
|
@ -24,17 +24,16 @@
|
||||||
"email": "jean-baptiste@holcroft.fr"
|
"email": "jean-baptiste@holcroft.fr"
|
||||||
}],
|
}],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.4"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install": [
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain"
|
||||||
"example": "domain.org"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "welcometext",
|
"name": "welcometext",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# 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 ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -13,6 +14,7 @@ source /usr/share/yunohost/helpers
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -29,19 +31,17 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Declaring files to be backed up..."
|
ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STANDARD BACKUP STEPS
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE APP MAIN DIR
|
# BACKUP THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup "$final_path"
|
ynh_backup --src_path="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP SYSTEMD
|
# BACKUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup "/etc/systemd/system/$app.service"
|
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -15,6 +15,9 @@ source /usr/share/yunohost/helpers
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
ynh_clean_setup () {
|
||||||
|
ynh_clean_check_starting
|
||||||
|
}
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
@ -22,13 +25,13 @@ ynh_abort_if_errors
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Retrieve arguments
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
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
|
||||||
|
|
||||||
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
server_password=$(ynh_string_random)
|
server_password=$(ynh_string_random)
|
||||||
su_passwd=$(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
|
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||||
|
|
||||||
final_path=/var/www/$app
|
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
|
# 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
|
ynh_script_progression --message="Finding an available port..." --weight=1
|
||||||
|
|
||||||
|
# Find an available port
|
||||||
port=$(ynh_find_port --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
|
||||||
|
|
||||||
|
@ -73,14 +77,14 @@ ynh_exec_warn_less 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
|
|
||||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#=================================================
|
#=================================================
|
||||||
# mumble server conf.ini
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Adding a configuration file..."
|
||||||
|
|
||||||
mkdir -p "$final_path"
|
mkdir -p "$final_path"
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$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"
|
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"
|
chmod -R 770 "$final_path"
|
||||||
chown -R :mumble-server "$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 stop mumble-server
|
||||||
systemctl disable mumble-server --quiet
|
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
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating 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"
|
yunohost service add $app --description="Mumble server" --log="/var/log/mumble-server/$app.log" --needs_exposed_ports="$port"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -23,7 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# 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`)
|
# 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
|
# Remove the dedicated systemd config
|
||||||
ynh_remove_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
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -57,21 +49,30 @@ ynh_script_progression --message="Removing app main directory..." --weight=2
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove --file="$final_path"
|
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
|
# CLOSE A PORT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if yunohost firewall list | grep -q "\- $port$"
|
if yunohost firewall list | grep -q "\- $port$"
|
||||||
then
|
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
|
ynh_exec_warn_less yunohost firewall disallow Both $port
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC REMOVE
|
# 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"
|
ynh_secure_remove --file="/var/log/mumble-server/$app.log"
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# 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 ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -13,6 +14,10 @@ source /usr/share/yunohost/helpers
|
||||||
# MANAGE SCRIPT FAILURE
|
# 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
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -30,8 +35,8 @@ port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..." --weight=1
|
ynh_script_progression --message="Validating restoration parameters..." --weight=1
|
||||||
|
|
||||||
test ! -d "$final_path" \
|
test ! -d $final_path \
|
||||||
|| ynh_die "There is already a directory: $final_path "
|
|| ynh_die --message="There is already a directory: $final_path "
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# STANDARD RESTORATION STEPS
|
||||||
|
@ -73,14 +78,6 @@ usermod --append --groups ssl-cert mumble-server
|
||||||
systemctl stop mumble-server
|
systemctl stop mumble-server
|
||||||
systemctl disable mumble-server --quiet
|
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
|
# RESTORE SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -89,6 +86,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig
|
||||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||||
systemctl enable $app.service --quiet
|
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
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -29,9 +29,34 @@ instance_id=$(ynh_app_setting_get --app=$app --key=instance_id)
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Checking version..."
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
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
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -106,32 +131,16 @@ if [ -z "$registername" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
|
||||||
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
|
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=6
|
ynh_script_progression --message="Upgrading dependencies..." --weight=6
|
||||||
|
|
||||||
# Install Mumble Debian package via apt
|
|
||||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
# mumble server conf.ini
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
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"
|
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"
|
chmod -R 770 "$final_path"
|
||||||
chown -R :mumble-server "$final_path"
|
chown -R :mumble-server "$final_path"
|
||||||
|
|
||||||
|
@ -181,7 +176,17 @@ systemctl stop mumble-server
|
||||||
systemctl disable mumble-server --quiet
|
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
|
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
|
Mumble configuration file : $mumble_conf
|
||||||
|
|
||||||
Note about config file: this package will regenerate the config file on upgrade.
|
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?
|
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
|
Please open a new issue in this project: https://github.com/YunoHost-Apps/mumbleserver_ynh
|
||||||
|
|
Loading…
Add table
Reference in a new issue