mirror of
https://github.com/YunoHost-Apps/mumbleserver_ynh.git
synced 2024-09-03 19:46:03 +02:00
Fix
This commit is contained in:
parent
c29f4f2f3f
commit
f31e9618fc
2 changed files with 26 additions and 26 deletions
|
@ -73,7 +73,7 @@ ynh_script_progression --message="Configuring firewall..." --weight=1
|
||||||
ynh_exec_warn_less yunohost firewall allow Both $port
|
ynh_exec_warn_less yunohost firewall allow Both $port
|
||||||
|
|
||||||
if [ "$mumbleweb" -eq 1 ] ; then
|
if [ "$mumbleweb" -eq 1 ] ; then
|
||||||
port_web=$(ynh_find_port 64737)
|
port_web=$(ynh_find_port --port=64737)
|
||||||
ynh_app_setting_set --app=$app --key=port_web --value=$port_web
|
ynh_app_setting_set --app=$app --key=port_web --value=$port_web
|
||||||
# Open port in firewall
|
# Open port in firewall
|
||||||
ynh_exec_warn_less yunohost firewall allow Both "$port_web"
|
ynh_exec_warn_less yunohost firewall allow Both "$port_web"
|
||||||
|
@ -129,10 +129,10 @@ ynh_add_config --template="../conf/mumble-server.ini" --destination="$final_path
|
||||||
if [ "$mumbleweb" -eq 1 ] ; then
|
if [ "$mumbleweb" -eq 1 ] ; then
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
(
|
(
|
||||||
cd "$final_path"
|
cd $final_path
|
||||||
chown -R "$app": "$final_path"
|
chown -R $app: $final_path
|
||||||
ynh_exec_as "$app" PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --save --loglevel warn
|
ynh_exec_warn_less ynh_exec_as "$app" PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --save --loglevel warn
|
||||||
ynh_exec_as "$app" PATH="$nodejs_path:$PATH" "$nodejs_path/npm" run build
|
ynh_exec_warn_less ynh_exec_as "$app" PATH="$nodejs_path:$PATH" "$nodejs_path/npm" run build
|
||||||
ls -lah
|
ls -lah
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
@ -147,7 +147,7 @@ ynh_add_systemd_config
|
||||||
|
|
||||||
if [ "$mumbleweb" -eq 1 ] ; then
|
if [ "$mumbleweb" -eq 1 ] ; then
|
||||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/mumble-web.service"
|
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/mumble-web.service"
|
||||||
ynh_add_systemd_config --service=$app-web --template=mumble-web.service
|
ynh_add_systemd_config --service=mumble-web --template=mumble-web.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -125,7 +125,15 @@ ynh_abort_if_errors
|
||||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name="$app" --action="stop"
|
ynh_systemd_action --service_name="$app" --action="stop"
|
||||||
ynh_systemd_action --service_name="$app-web" --action="stop"
|
ynh_systemd_action --service_name="mumble-web" --action="stop"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CREATE DEDICATED USER
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
|
||||||
|
|
||||||
|
# Create a dedicated user (if not existing)
|
||||||
|
ynh_system_user_create --username="$app" --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -142,7 +150,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1
|
ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
@ -155,14 +163,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||||
# Install Mumble Debian package via apt
|
# 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
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
|
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
|
||||||
ynh_system_user_create --username="$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -182,7 +182,7 @@ ynh_add_systemd_config
|
||||||
|
|
||||||
if [ "$mumbleweb" -eq 1 ] ; then
|
if [ "$mumbleweb" -eq 1 ] ; then
|
||||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/mumble-web.service"
|
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/mumble-web.service"
|
||||||
ynh_add_systemd_config --service=$app-web --template=mumble-web.service
|
ynh_add_systemd_config --service=mumble-web --template=mumble-web.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -206,7 +206,7 @@ usermod --append --groups ssl-cert mumble-server
|
||||||
|
|
||||||
# || true temporarily to ignore a bug in murmurd 1.3.0
|
# || true temporarily to ignore a bug in murmurd 1.3.0
|
||||||
# https://github.com/mumble-voip/mumble/issues/3911
|
# https://github.com/mumble-voip/mumble/issues/3911
|
||||||
murmurd -ini "$mumble_conf" -supw "$su_passwd" "$instance_id" || true
|
murmurd -ini "../conf/mumble-server.ini" -supw "$su_passwd" "$instance_id" || true
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Disable default server installed by Debian's package
|
# Disable default server installed by Debian's package
|
||||||
|
@ -230,15 +230,15 @@ ynh_script_progression --message="Starting a systemd service..." --weight=3
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name="$app" --action="start"
|
ynh_systemd_action --service_name="$app" --action="start"
|
||||||
ynh_systemd_action --service_name="$app-web" --action="start"
|
ynh_systemd_action --service_name="mumble-web" --action="start"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading nginx web server..." --time --weight=1
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=2
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ 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 : ../conf/mumble-server.ini
|
||||||
|
|
||||||
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 $final_path.
|
||||||
|
|
Loading…
Add table
Reference in a new issue