mirror of
https://github.com/YunoHost-Apps/kodi_ynh.git
synced 2024-09-03 19:26:34 +02:00
commit
da030ea198
9 changed files with 34 additions and 41 deletions
|
@ -15,7 +15,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Transform your YunoHost server into media center with Kodi
|
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:** 17.3~ynh1
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
|
|
||||||
Transfromez votre serveur YunoHost en media center avec Kodi
|
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 :** 17.3~ynh1
|
||||||
|
|
||||||
|
|
1
doc/DESCRIPTION.md
Normal file
1
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +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.
|
|
@ -3,8 +3,8 @@
|
||||||
"id": "kodi",
|
"id": "kodi",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Transform your YunoHost server into media center with Kodi",
|
"en": "Media center that brings all your digital media together",
|
||||||
"fr": "Transfromez votre serveur YunoHost en media center avec Kodi"
|
"fr": "Centre multimédia qui rassemble tous vos médias numériques"
|
||||||
},
|
},
|
||||||
"version": "17.3~ynh1",
|
"version": "17.3~ynh1",
|
||||||
"url": "https://kodi.tv",
|
"url": "https://kodi.tv",
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
"url": "blog.cecchettosylvain.fr"
|
"url": "blog.cecchettosylvain.fr"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.1.3"
|
"yunohost": ">= 4.2.3"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -31,8 +31,7 @@
|
||||||
"install" : [
|
"install" : [
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain"
|
||||||
"example": "example.com"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
|
|
|
@ -19,6 +19,30 @@ package_check_dependencies="xserver-xorg-video-dummy"
|
||||||
# EXPERIMENTAL HELPERS
|
# 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
|
# FUTURE OFFICIAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_detect_arch__2
|
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -169,7 +168,7 @@ usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev "$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --log "$final_path/.kodi/temp/kodi.log" --needs_exposed_ports $port
|
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports=$port
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source ../settings/scripts/ynh_detect_arch__2
|
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -53,8 +52,6 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..."
|
ynh_script_progression --message="Validating restoration parameters..."
|
||||||
|
|
||||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
|
||||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
|
||||||
test ! -d $final_path \
|
test ! -d $final_path \
|
||||||
|| ynh_die --message="There is already a directory: $final_path "
|
|| ynh_die --message="There is already a directory: $final_path "
|
||||||
|
|
||||||
|
@ -148,7 +145,7 @@ usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev "$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports $port
|
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports=$port
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_detect_arch__2
|
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -28,7 +27,6 @@ arch=$(ynh_detect_arch)
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Checking version..."
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
|
|
||||||
|
@ -150,7 +148,7 @@ usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev "$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports $port
|
yunohost service add $app --description="media center" --log="$final_path/.kodi/temp/kodi.log" --needs_exposed_ports=$port
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# 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
|
|
||||||
}
|
|
Loading…
Reference in a new issue