1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kodi_ynh.git synced 2024-09-03 19:26:34 +02:00

Apply last example_ynh

This commit is contained in:
yalh76 2022-02-04 02:50:39 +01:00
parent 904ed93556
commit d0687aed80
6 changed files with 10 additions and 9 deletions

View file

@ -6,7 +6,7 @@
"en": "Media center that brings all your digital media together",
"fr": "Centre multimédia qui rassemble tous vos médias numériques"
},
"version": "17.3~ynh1",
"version": "19.1~ynh1",
"url": "https://kodi.tv",
"upstream": {
"license": "GPL-2.0",

View file

@ -69,7 +69,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
# If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !)
# Open the port
# ynh_script_progression --message="Configuring firewall..."
ynh_script_progression --message="Configuring firewall..."
if [ "$open_webserver_port" -eq 1 ]
then
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
@ -104,7 +104,7 @@ fi
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app --home_dir=$final_path
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# NGINX CONFIGURATION

View file

@ -37,10 +37,10 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# FIND AND OPEN A PORT
#=================================================
ynh_script_progression --message="Finding an available port..."
# ynh_script_progression --message="Finding an available port..."
# Open the port
# ynh_script_progression --message="Configuring firewall..."
ynh_script_progression --message="Configuring firewall..."
if [ "$open_webserver_port" -eq 1 ]
then
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
@ -69,7 +69,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_script_progression --message="Recreating the dedicated system user..."
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR

View file

@ -26,6 +26,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# CHECK VERSION
#=================================================
ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
@ -88,7 +89,7 @@ fi
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# NGINX CONFIGURATION