mirror of
https://github.com/YunoHost-Apps/kodi_ynh.git
synced 2024-09-03 19:26:34 +02:00
Install from deb.multimedia
This commit is contained in:
parent
39a3c7f7ef
commit
1decb41596
8 changed files with 31 additions and 28 deletions
|
@ -19,7 +19,6 @@
|
|||
upgrade=1
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
port_already_use=1 (8080)
|
||||
change_url=1
|
||||
;;; Options
|
||||
Email=
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<services>
|
||||
<esallinterfaces>true</esallinterfaces>
|
||||
<webserver>true</webserver>
|
||||
<webserverport>__PORT__</webserverport>
|
||||
<zeroconf>true</zeroconf>
|
||||
</services>
|
||||
</advancedsettings>
|
7
conf/deb-multimedia-keyring.src
Normal file
7
conf/deb-multimedia-keyring.src
Normal file
|
@ -0,0 +1,7 @@
|
|||
SOURCE_URL=http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
|
||||
SOURCE_SUM=9faa6f6cba80aeb69c9bac139b74a3d61596d4486e2458c2c65efe9e21ff3c7d
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=deb-multimedia-keyring.deb
|
||||
SOURCE_EXTRACT=false
|
|
@ -1,25 +1,9 @@
|
|||
location __PATH__/ {
|
||||
rewrite ^__PATH__/jsonrpc(.*) /jsonrpc$uri;
|
||||
rewrite ^__PATH__/image/(.*) /image/$uri;
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
proxy_pass http://127.0.0.1:__PORT__/;
|
||||
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
||||
# For kodi
|
||||
# Shouldn't need this when proxy headers are turned on. No idea why it does not work (Settings -> Web interface -> Reverse proxy support)
|
||||
location ~ ^/(image|jsonrpc) {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
|
@ -13,7 +13,7 @@ Type=simple
|
|||
User=__APP__
|
||||
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-standalone -- :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
|
||||
RestartSec = 5
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ ynh_app_setting_set --app=$app --key=open_webserver_port --value=$open_webserver
|
|||
ynh_script_progression --message="Finding an available port..."
|
||||
|
||||
# Find an available port
|
||||
port=8080
|
||||
port=$(ynh_find_port --port=8095)
|
||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||
|
||||
# Optional: Expose this port publicly
|
||||
|
@ -81,10 +81,14 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..."
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
ynh_setup_source --dest_dir="$tmpdir" --source_id="deb-multimedia-keyring"
|
||||
sudo dpkg -i "$tmpdir/deb-multimedia-keyring.deb"
|
||||
|
||||
if [[ $arch != arm* ]]; then
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$pkg_dependencies"
|
||||
else
|
||||
ynh_install_app_dependencies $arm_pkg_dependencies
|
||||
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$arm_pkg_dependencies"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -110,7 +114,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring X11..."
|
||||
|
||||
ynh_replace_string "allowed_users=console" "allowed_users=anybody" /etc/X11/Xwrapper.config
|
||||
ynh_replace_string --match_string="allowed_users=console" --replace_string="allowed_users=anybody" --target_file="/etc/X11/Xwrapper.config"
|
||||
|
||||
#=================================================
|
||||
# CONFUGURING KODI
|
||||
|
@ -118,7 +122,7 @@ ynh_replace_string "allowed_users=console" "allowed_users=anybody" /etc/X11/Xwra
|
|||
ynh_script_progression --message="Configuring Kodi..."
|
||||
|
||||
mkdir -p "$final_path/.kodi/userdata/"
|
||||
cp ../conf/advancedsettings.xml "$final_path/.kodi/userdata/advancedsettings.xml"
|
||||
ynh_add_config --template="../conf/advancedsettings.xml" --destination="$final_path/.kodi/userdata/advancedsettings.xml"
|
||||
|
||||
mkdir -p "$final_path/.kodi/addons/"
|
||||
if [[ $arch != arm* ]]; then
|
||||
|
|
|
@ -98,10 +98,14 @@ usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev "$app"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..."
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
ynh_setup_source --dest_dir="$tmpdir" --source_id="deb-multimedia-keyring"
|
||||
sudo dpkg -i "$tmpdir/deb-multimedia-keyring.deb"
|
||||
|
||||
if [[ $arch != arm* ]]; then
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$pkg_dependencies"
|
||||
else
|
||||
ynh_install_app_dependencies $arm_pkg_dependencies
|
||||
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$arm_pkg_dependencies"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -95,10 +95,14 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..."
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
ynh_setup_source --dest_dir="$tmpdir" --source_id="deb-multimedia-keyring"
|
||||
sudo dpkg -i "$tmpdir/deb-multimedia-keyring.deb"
|
||||
|
||||
if [[ $arch != arm* ]]; then
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$pkg_dependencies"
|
||||
else
|
||||
ynh_install_app_dependencies $arm_pkg_dependencies
|
||||
ynh_install_extra_app_dependencies --repo="deb https://www.deb-multimedia.org/ buster main non-free" --package="$arm_pkg_dependencies"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue