mirror of
https://github.com/YunoHost-Apps/mumbleserver_ynh.git
synced 2024-09-03 19:46:03 +02:00
start mumble-web integration
This commit is contained in:
parent
4182668116
commit
d64b9ecb73
6 changed files with 56 additions and 8 deletions
|
@ -4,6 +4,7 @@
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
welcometext="Welcome to my mumble server"
|
welcometext="Welcome to my mumble server"
|
||||||
registername="Root"
|
registername="Root"
|
||||||
|
mumbleweb=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=0
|
setup_sub_dir=0
|
||||||
|
@ -11,10 +12,10 @@
|
||||||
setup_nourl=1
|
setup_nourl=1
|
||||||
setup_private=0
|
setup_private=0
|
||||||
setup_public=0
|
setup_public=0
|
||||||
upgrade=1
|
upgrade=0
|
||||||
# latest published in community.json
|
# latest published in community.json
|
||||||
backup_restore=1
|
backup_restore=0
|
||||||
multi_instance=1
|
multi_instance=0
|
||||||
wrong_user=0
|
wrong_user=0
|
||||||
wrong_path=0
|
wrong_path=0
|
||||||
incorrect_path=0
|
incorrect_path=0
|
||||||
|
@ -33,4 +34,4 @@
|
||||||
Level 10=0
|
Level 10=0
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=jean-baptiste@holcroft.fr
|
Email=jean-baptiste@holcroft.fr
|
||||||
Notification=all
|
Notification=all
|
||||||
|
|
15
conf/mumble-web.service
Normal file
15
conf/mumble-web.service
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Mumble web interface
|
||||||
|
Documentation=https://github.com/johni0702/mumble-web
|
||||||
|
Requires=network.target mumble-server.service
|
||||||
|
After=network.target mumble-server.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=www-data
|
||||||
|
Environment="PATH=__ENV_PATH__"
|
||||||
|
Environment=NODE_ENV=production
|
||||||
|
ExecStart=/usr/bin/websockify --web=/usr/lib/node_modules/mumble-web/dist --ssl-target localhost:64737 localhost:64738
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -46,6 +46,14 @@
|
||||||
},
|
},
|
||||||
"example": "Root",
|
"example": "Root",
|
||||||
"default": "Root"
|
"default": "Root"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mumbleweb",
|
||||||
|
"type": "boolean",
|
||||||
|
"ask": {
|
||||||
|
"en": "Install the web application? (mumble-web)"
|
||||||
|
},
|
||||||
|
"default": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ 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
|
||||||
|
mumbleweb=$YNH_APP_ARG_MUMBLEWEB
|
||||||
|
|
||||||
server_password=$(ynh_string_random)
|
server_password=$(ynh_string_random)
|
||||||
su_passwd=$(ynh_string_random)
|
su_passwd=$(ynh_string_random)
|
||||||
|
@ -51,6 +52,7 @@ ynh_app_setting_set "$app" su_passwd "$su_passwd"
|
||||||
ynh_app_setting_set "$app" welcometext "$welcometext"
|
ynh_app_setting_set "$app" welcometext "$welcometext"
|
||||||
ynh_app_setting_set "$app" registerName "$registerName"
|
ynh_app_setting_set "$app" registerName "$registerName"
|
||||||
ynh_app_setting_set "$app" instance_id "$instance_id"
|
ynh_app_setting_set "$app" instance_id "$instance_id"
|
||||||
|
ynh_app_setting_set "$app" mumbleweb "$mumbleweb"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -69,7 +71,20 @@ yunohost firewall allow Both "$port"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Install Mumble Debian package via apt
|
# Install Mumble Debian package via apt
|
||||||
ynh_install_app_dependencies mumble-server mailutils
|
ynh_install_app_dependencies mumble-server mailutils websockify
|
||||||
|
|
||||||
|
ynh_install_nodejs --nodejs_version="10"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL Mumble-web
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
if [ "$mumbleweb" -eq 1 ] ; then
|
||||||
|
ynh_use_nodejs
|
||||||
|
(
|
||||||
|
npm install mumble-web@0.5.1
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
|
@ -101,6 +116,7 @@ ynh_store_file_checksum "$mumble_conf"
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
ynh_add_systemd_config mumble-web
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
@ -158,4 +174,4 @@ If you changed it manually and upgrade mumble, you'll find a backup in $final_pa
|
||||||
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
|
||||||
"
|
"
|
||||||
ynh_send_readme_to_admin "$message"
|
ynh_send_readme_to_admin "$message"
|
||||||
|
|
|
@ -37,6 +37,7 @@ fi
|
||||||
|
|
||||||
# Remove the dedicated systemd config
|
# Remove the dedicated systemd config
|
||||||
ynh_remove_systemd_config
|
ynh_remove_systemd_config
|
||||||
|
ynh_remove_systemd_config mumble-web
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DEPENDENCIES
|
# REMOVE DEPENDENCIES
|
||||||
|
@ -45,6 +46,12 @@ ynh_remove_systemd_config
|
||||||
# Remove metapackage and its dependencies
|
# Remove metapackage and its dependencies
|
||||||
ynh_remove_app_dependencies
|
ynh_remove_app_dependencies
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE NODEJS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_remove_nodejs
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -23,6 +23,7 @@ registerName=$(ynh_app_setting_get "$app" registerName)
|
||||||
port=$(ynh_app_setting_get "$app" port)
|
port=$(ynh_app_setting_get "$app" port)
|
||||||
final_path=$(ynh_app_setting_get "$app" final_path)
|
final_path=$(ynh_app_setting_get "$app" final_path)
|
||||||
instance_id=$(ynh_app_setting_get "$app" instance_id)
|
instance_id=$(ynh_app_setting_get "$app" instance_id)
|
||||||
|
mumbleweb=$(ynh_app_setting_get "$app" mumbleweb)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
|
@ -116,7 +117,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Install Mumble Debian package via apt
|
# Install Mumble Debian package via apt
|
||||||
ynh_install_app_dependencies mumble-server mailutils
|
ynh_install_app_dependencies mumble-server mailutils websockify
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
|
@ -208,4 +209,4 @@ If you changed it manually and upgrade mumble, you'll find a backup in $final_pa
|
||||||
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
|
||||||
"
|
"
|
||||||
ynh_send_readme_to_admin "$message"
|
ynh_send_readme_to_admin "$message"
|
||||||
|
|
Loading…
Add table
Reference in a new issue