mirror of
https://github.com/YunoHost-Apps/kodi_ynh.git
synced 2024-09-03 19:26:34 +02:00
Fix nginx conf for control web interface in yunohost pannel
This commit is contained in:
parent
9b70710c31
commit
13686b70ad
3 changed files with 36 additions and 15 deletions
17
README.md
17
README.md
|
@ -12,20 +12,27 @@ Kodi for YunoHost
|
||||||
[![Install Kodi with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=kodi)
|
[![Install Kodi with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=kodi)
|
||||||
|
|
||||||
## Current package status
|
## Current package status
|
||||||
* The scprit use jessie backports to install Kodi 16 (We have to wait for Debian Strech officialy install Kodi 17)
|
* The scprit use jessie backports to install Kodi 16 on x86 machines (We have to wait for YunoHost Debian Strech support or use testing source)
|
||||||
* A dedicated kodi user is create
|
* A dedicated kodi user is create
|
||||||
* Use of systemd
|
* Use of systemd
|
||||||
* You can launch Kodi with the ```sudo systemctl start kodi``` command or stop Kodi with ```sudo systemctl stop kodi```
|
* You can launch Kodi with the ```sudo systemctl start kodi``` command or stop Kodi with ```sudo systemctl stop kodi```
|
||||||
* You can choose if you want that Kodi start at YunoHost server statup
|
* You can choose if you want that Kodi start at YunoHost server statup
|
||||||
* You can access to the control web interface only if you choose a "/" path (Reverse proxy issue)
|
* You can access to the control web interface from the YunoHost pannel
|
||||||
* Kodi directly start after package installation
|
* Kodi directly start after package installation
|
||||||
|
* Start and stop Kodi from Admin YunoHost services tab
|
||||||
|
|
||||||
## To do
|
## To do
|
||||||
* Add the control web interface to YunoHost user interface
|
* Test control web interface on Raspberry
|
||||||
* Maybe we can launch Kodi from YunoHost web interface instead of SSH
|
* Include SSOWat pannel in nginx.conf
|
||||||
|
* Switch from skipped_uri to protected_uri and try if it still works
|
||||||
|
* Add missing elements in remove script
|
||||||
|
* Add option in manifest to open 8080 port to be able to use Kodi remote smartphone app
|
||||||
|
* Check if a "/" path still works
|
||||||
|
* Write the upgrade script
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
* Report a bug: Use GitHub issues
|
* Report a bug: Use GitHub issues or dedicated forum
|
||||||
|
* YunoHost forum thread: [Kodi package](https://forum.yunohost.org/t/kodi-package-yunohost-as-a-media-center/3561/17)
|
||||||
* Kodi website: https://kodi.tv
|
* Kodi website: https://kodi.tv
|
||||||
* YunoHost website: https://yunohost.org/
|
* YunoHost website: https://yunohost.org/
|
|
@ -1,11 +1,9 @@
|
||||||
location __PATH__ {
|
location __PATH__/ {
|
||||||
proxy_pass http://127.0.0.1:8080$uri;
|
rewrite ^__PATH__/jsonrpc(.*) /jsonrpc$uri;
|
||||||
rewrite ^ $request_uri;
|
rewrite ^__PATH__/image/(.*) /image/$uri;
|
||||||
rewrite ^([^.]*[^/])$ $1/ permanent;
|
proxy_pass http://127.0.0.1:8080/;
|
||||||
rewrite ^__PATH__(.*) /$1 break;
|
|
||||||
proxy_redirect http://127.0.0.1:8080 __PATH__;
|
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_redirect off;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Scheme $scheme;
|
proxy_set_header X-Scheme $scheme;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
|
|
@ -65,9 +65,10 @@ if [[ $arch != arm* ]]; then
|
||||||
fi
|
fi
|
||||||
ynh_package_update
|
ynh_package_update
|
||||||
if [[ $arch == arm* ]]; then
|
if [[ $arch == arm* ]]; then
|
||||||
ynh_package_install xserver-xorg-legacy
|
ynh_package_install xserver-xorg-legacy xorg dbus-x11 kodi
|
||||||
|
else
|
||||||
|
ynh_package_install xorg xinit dbus-x11 kodi
|
||||||
fi
|
fi
|
||||||
ynh_package_install xorg dbus-x11 kodi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# X11 SETTINGS
|
# X11 SETTINGS
|
||||||
|
@ -84,12 +85,27 @@ yunohost service add $app --log "/home/$app/.kodi/temp/kodi.log"
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONTROL WEB INTERFACE
|
# CONTROL WEB INTERFACE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
if [[ $arch != arm* ]]; then
|
||||||
|
sudo wget "https://github.com/xbmc/chorus2/releases/download/2.4.4/webinterface.default.2.4.4.zip" -P /tmp
|
||||||
|
sudo unzip "/tmp/webinterface.default.2.4.4.zip" -d /tmp/
|
||||||
|
sudo mkdir -p /home/kodi/.kodi/addons/
|
||||||
|
sudo mv /tmp/webinterface.default/ /home/kodi/.kodi/addons/webinterface.chorus2/
|
||||||
|
fi
|
||||||
sudo mkdir -p /home/$app/.kodi/userdata/
|
sudo mkdir -p /home/$app/.kodi/userdata/
|
||||||
sudo cp ../conf/advancedsettings.xml /home/$app/.kodi/userdata/advancedsettings.xml
|
sudo cp ../conf/advancedsettings.xml /home/$app/.kodi/userdata/advancedsettings.xml
|
||||||
sudo chown -R $app:$app /home/$app
|
sudo chown -R $app:$app /home/$app
|
||||||
|
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# NGINX
|
||||||
|
#=================================================
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
ynh_app_setting_set $app protected_uris "/"
|
ynh_app_setting_set $app skipped_uris "/"
|
||||||
|
domainregex=$(echo "$domain" | sed 's/-/\%&/g')
|
||||||
|
|
||||||
|
ynh_app_setting_set $app skipped_regex "$domainregex/jsonrpc.*$,$domainregex/image.*$"
|
||||||
|
|
||||||
|
|
||||||
# Reload SSOwat config
|
# Reload SSOwat config
|
||||||
yunohost app ssowatconf
|
yunohost app ssowatconf
|
||||||
|
|
Loading…
Reference in a new issue