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

Merge pull request #15 from YunoHost-Apps/bullseye

Bullseye
This commit is contained in:
yalh76 2022-02-05 12:54:28 +01:00 committed by GitHub
commit 4f66318eb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 25 additions and 49 deletions

View file

@ -17,7 +17,8 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
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.
**Shipped version:** 17.3~ynh1
**Shipped version:** 19.1~ynh1

View file

@ -13,7 +13,8 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
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.
**Version incluse :** 17.3~ynh1
**Version incluse :** 19.1~ynh1

View file

@ -15,7 +15,7 @@ Group=__APP__
#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
Restart=on-abort
RestartSec = 5
RestartSec=5
[Install]
WantedBy=multi-user.target

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",
@ -21,7 +21,7 @@
"url": "blog.cecchettosylvain.fr"
},
"requirements": {
"yunohost": ">= 4.2.3"
"yunohost": ">= 4.3.0"
},
"multi_instance": false,
"services": [

View file

@ -19,30 +19,6 @@ package_check_dependencies="xserver-xorg-video-dummy"
# EXPERIMENTAL HELPERS
#=================================================
# Check the architecture
#
# example: architecture=$(ynh_detect_arch)
#
# usage: ynh_detect_arch
#
# Requires YunoHost version 2.2.4 or higher.
ynh_detect_arch(){
local architecture
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then
architecture="i386"
elif [ -n "$(uname -m | grep arm)" ]; then
architecture="arm"
else
architecture="unknown"
fi
echo $architecture
}
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View file

@ -28,7 +28,6 @@ path_url=$YNH_APP_ARG_PATH
is_public=1
launch_on_boot=$YNH_APP_ARG_LAUNCH_ON_BOOT
open_webserver_port=$YNH_APP_ARG_OPEN_WEBSERVER_PORT
arch=$(ynh_detect_arch)
app=$YNH_APP_INSTANCE_NAME
@ -70,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
@ -89,10 +88,10 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
fi
if [[ $arch != arm* ]]; then
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$pkg_dependencies"
if [[ $YNH_ARCH != arm* ]]; then
ynh_install_app_dependencies $pkg_dependencies
else
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$arm_pkg_dependencies"
ynh_install_app_dependencies $arm_pkg_dependencies
fi
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
@ -105,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
@ -133,7 +132,7 @@ mkdir -p "$final_path/.kodi/userdata/"
ynh_add_config --template="../conf/advancedsettings.xml" --destination="$final_path/.kodi/userdata/advancedsettings.xml"
mkdir -p "$final_path/.kodi/addons/"
if [[ $arch != arm* ]]; then
if [[ $YNH_ARCH != arm* ]]; then
ynh_setup_source --dest_dir="$final_path/.kodi/addons/" --source_id="arm-chorus2"
fi

View file

@ -33,15 +33,14 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
launch_on_boot=$(ynh_app_setting_get --app=$app --key=launch_on_boot)
open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port)
port=$(ynh_app_setting_get --app=$app --key=port)
arch=$(ynh_detect_arch)
#=================================================
# 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
@ -70,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
@ -94,10 +93,10 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
fi
if [[ $arch != arm* ]]; then
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$pkg_dependencies"
if [[ $YNH_ARCH != arm* ]]; then
ynh_install_app_dependencies $pkg_dependencies
else
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$arm_pkg_dependencies"
ynh_install_app_dependencies $arm_pkg_dependencies
fi
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then

View file

@ -22,11 +22,11 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
launch_on_boot=$(ynh_app_setting_get --app=$app --key=launch_on_boot)
open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port)
port=$(ynh_app_setting_get --app=$app --key=port)
arch=$(ynh_detect_arch)
#=================================================
# CHECK VERSION
#=================================================
ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
@ -89,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
@ -112,10 +112,10 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
fi
if [[ $arch != arm* ]]; then
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$pkg_dependencies"
if [[ $YNH_ARCH != arm* ]]; then
ynh_install_app_dependencies $pkg_dependencies
else
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$arm_pkg_dependencies"
ynh_install_app_dependencies $arm_pkg_dependencies
fi
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then