mirror of
https://github.com/YunoHost-Apps/mumbleserver_ynh.git
synced 2024-09-03 19:46:03 +02:00
Cleaning up
This commit is contained in:
parent
d9ece341d5
commit
0d2025838c
7 changed files with 16 additions and 41 deletions
|
@ -37,8 +37,8 @@ This package installs the Debian package and configures it with given settings.
|
|||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/mumbleserver/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/mumbleserver/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/mumbleserver/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/mumbleserver/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ mumbleserver_ynh installe le paquet Debian et le configure avec les paramètres
|
|||
|
||||
#### Architectures supportées
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/mumbleserver/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/mumbleserver/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/mumbleserver/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/mumbleserver/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
|
|
@ -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=
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue