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
f163de437a
commit
8d270cf795
5 changed files with 17 additions and 22 deletions
|
@ -7,7 +7,7 @@
|
||||||
mumbleweb=1
|
mumbleweb=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=1
|
setup_sub_dir=0
|
||||||
setup_root=1
|
setup_root=1
|
||||||
setup_nourl=1
|
setup_nourl=1
|
||||||
setup_private=1
|
setup_private=1
|
||||||
|
|
|
@ -83,7 +83,7 @@ if [ "$mumbleweb" -eq 1 ] ; then
|
||||||
port_web=$(ynh_find_port --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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -197,7 +197,7 @@ ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
# Add Mumble as a YunoHost service
|
# Add Mumble as a YunoHost service
|
||||||
yunohost service add $app --description="Mumble server" --log="/var/log/$app/$app.log" --needs_exposed_ports=$port
|
yunohost service add $app --description="Mumble server" --log="/var/log/$app/$app.log" --needs_exposed_ports=$port
|
||||||
# Add Mumble as a YunoHost service
|
# Add Mumble as a YunoHost service
|
||||||
yunohost service add mumble-web --description="Mumble web" --log="/var/log/$app/mumble-web.log" --needs_exposed_ports=$port_web
|
yunohost service add mumble-web --description="Mumble web" --log="/var/log/$app/mumble-web.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -43,7 +43,7 @@ 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
|
||||||
ynh_remove_systemd_config mumble-web
|
ynh_remove_systemd_config --service=mumble-web
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DEPENDENCIES
|
# REMOVE DEPENDENCIES
|
||||||
|
@ -52,11 +52,7 @@ ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
# Remove metapackage and its dependencies
|
||||||
ynh_remove_app_dependencies
|
ynh_remove_app_dependencies
|
||||||
|
# Remove NodeJS
|
||||||
#=================================================
|
|
||||||
# REMOVE NODEJS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_remove_nodejs
|
ynh_remove_nodejs
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -85,13 +81,13 @@ then
|
||||||
ynh_exec_warn_less yunohost firewall disallow Both $port
|
ynh_exec_warn_less yunohost firewall disallow Both $port
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$mumbleweb" -eq 1 ] ; then
|
# if [ "$mumbleweb" -eq 1 ] ; then
|
||||||
if yunohost firewall list | grep -q "\- $port_web$"
|
# if yunohost firewall list | grep -q "\- $port_web$"
|
||||||
then
|
# then
|
||||||
echo "Close port $port_web"
|
# echo "Close port $port_web"
|
||||||
yunohost firewall disallow Both "$port_web" > /dev/null 2>&1
|
# yunohost firewall disallow Both "$port_web" > /dev/null 2>&1
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC REMOVE
|
# SPECIFIC REMOVE
|
||||||
|
|
|
@ -102,7 +102,7 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||||
# Add Mumble as a YunoHost service
|
# Add Mumble as a YunoHost service
|
||||||
yunohost service add $app --description="Mumble server" --log="/var/log/$app/$app.log" --needs_exposed_ports=$port
|
yunohost service add $app --description="Mumble server" --log="/var/log/$app/$app.log" --needs_exposed_ports=$port
|
||||||
# Add Mumble as a YunoHost service
|
# Add Mumble as a YunoHost service
|
||||||
yunohost service add mumble-web --description="Mumble web" --log="/var/log/$app/mumble-web.log" --needs_exposed_ports=$port_web
|
yunohost service add mumble-web --description="Mumble web" --log="/var/log/$app/mumble-web.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
|
|
|
@ -140,11 +140,10 @@ ynh_system_user_create --username="$app" --home_dir="$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ "$mumbleweb" -eq 1 ] ; then
|
if [ "$mumbleweb" -eq 1 ] ; then
|
||||||
then
|
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/mumble-server.ini"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -169,7 +168,7 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
# mumble server conf.ini
|
# mumble server conf.ini
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
mkdir -p $final_path
|
#mkdir -p $final_path
|
||||||
ynh_add_config --template="../conf/mumble-server.ini" --destination="$final_path/mumble-server.ini"
|
ynh_add_config --template="../conf/mumble-server.ini" --destination="$final_path/mumble-server.ini"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -222,7 +221,7 @@ systemctl disable mumble-server --quiet
|
||||||
# Add Mumble as a YunoHost service
|
# Add Mumble as a YunoHost service
|
||||||
yunohost service add $app --description="Mumble server" --log="/var/log/$app/$app.log" --needs_exposed_ports=$port
|
yunohost service add $app --description="Mumble server" --log="/var/log/$app/$app.log" --needs_exposed_ports=$port
|
||||||
# Add Mumble as a YunoHost service
|
# Add Mumble as a YunoHost service
|
||||||
yunohost service add mumble-web --description="Mumble web" --log="/var/log/$app/mumble-web.log" --needs_exposed_ports=$port_web
|
yunohost service add mumble-web --description="Mumble web" --log="/var/log/$app/mumble-web.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
@ -244,7 +243,7 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
message="
|
message="
|
||||||
Mumbleserver was updated!
|
Mumble-server was updated!
|
||||||
|
|
||||||
Port : $port
|
Port : $port
|
||||||
Password to join server: $server_password
|
Password to join server: $server_password
|
||||||
|
|
Loading…
Add table
Reference in a new issue