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

@ -15,7 +15,7 @@ Group=__APP__
#PAMName=login # you might want to try this one, did not work on all systems #PAMName=login # you might want to try this one, did not work on all systems
ExecStart=/usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi -- :0 -nolisten tcp vt7 ExecStart=/usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi -- :0 -nolisten tcp vt7
Restart=on-abort Restart=on-abort
RestartSec = 5 RestartSec=5
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -1 +1 @@
Kodi is a media center and entertainment hub that brings all your digital media together. It is 100% free and open source, very customisable and runs on a wide variety of devices. Users can play and view most videos, music, podcasts, games and other digital media files from local and network storage media and the internet. Kodi is a media center and entertainment hub that brings all your digital media together. It is 100% free and open source, very customisable and runs on a wide variety of devices. Users can play and view most videos, music, podcasts, games and other digital media files from local and network storage media and the internet.

View file

@ -6,7 +6,7 @@
"en": "Media center that brings all your digital media together", "en": "Media center that brings all your digital media together",
"fr": "Centre multimédia qui rassemble tous vos médias numériques" "fr": "Centre multimédia qui rassemble tous vos médias numériques"
}, },
"version": "17.3~ynh1", "version": "19.1~ynh1",
"url": "https://kodi.tv", "url": "https://kodi.tv",
"upstream": { "upstream": {
"license": "GPL-2.0", "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 !) # If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !)
# Open the port # Open the port
# ynh_script_progression --message="Configuring firewall..." ynh_script_progression --message="Configuring firewall..."
if [ "$open_webserver_port" -eq 1 ] if [ "$open_webserver_port" -eq 1 ]
then then
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
@ -104,7 +104,7 @@ fi
ynh_script_progression --message="Configuring system user..." ynh_script_progression --message="Configuring system user..."
# Create a 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 # NGINX CONFIGURATION

View file

@ -37,10 +37,10 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#================================================= #=================================================
# FIND AND OPEN A 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 # Open the port
# ynh_script_progression --message="Configuring firewall..." ynh_script_progression --message="Configuring firewall..."
if [ "$open_webserver_port" -eq 1 ] if [ "$open_webserver_port" -eq 1 ]
then then
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port 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..." ynh_script_progression --message="Recreating the dedicated system user..."
# Create the dedicated user (if not existing) # 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 # RESTORE THE APP MAIN DIR

View file

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