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

Start working on Web control interface

This commit is contained in:
SylvainCecchetto 2017-09-30 11:56:47 +02:00
parent 65db61cc5e
commit 66afd8c122
4 changed files with 32 additions and 3 deletions

View file

@ -0,0 +1,7 @@
<advancedsettings>
<services>
<esallinterfaces>true</esallinterfaces>
<webserver>true</webserver>
<zeroconf>true</zeroconf>
</services>
</advancedsettings>

10
conf/nginx.conf Normal file
View file

@ -0,0 +1,10 @@
location __PATH__/ {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

View file

@ -45,7 +45,6 @@ ynh_app_setting_set $app launch_on_boot $launch_on_boot
#=================================================
sudo mkdir /home/$app
ynh_system_user_create "$app" "/home/$app"
sudo chown -R $app:$app /home/$app
sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input $app
#=================================================
@ -64,7 +63,7 @@ if [[ $arch != arm* ]]; then
sudo cp ../conf/kodi.list /etc/apt/sources.list.d/${app}.list
fi
ynh_package_update
ynh_package_install xorg dbus-x11 kodi
ynh_package_install xserver-xorg-legacy xorg dbus-x11 kodi
#=================================================
# X11 SETTINGS
@ -72,3 +71,10 @@ ynh_package_install xorg dbus-x11 kodi
sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
#=================================================
# CONTROL WEB INTERFACE
#=================================================
sudo mkdir -p /home/$app/.kodi/userdata/
sudo cp ../conf/advancedsettings.xml /home/$app/.kodi/userdata/advancedsettings.xml
sudo chown -R $app:$app /home/$app
ynh_add_nginx_config

View file

@ -25,7 +25,7 @@ launch_on_boot=$(ynh_app_setting_get $app launch_on_boot)
#=================================================
# Remove metapackage and its dependencies
sudo sed -i 's/allowed_users=anybody/allowed_users=console/' /etc/X11/Xwrapper.config
ynh_package_autoremove kodi xorg dbus-x11
ynh_package_autoremove kodi xorg dbus-x11 xserver-xorg-legacy
arch=$(uname -m)
if [[ $arch != arm* ]]; then
sudo rm -f "/etc/apt/sources.list.d/${app}.list"
@ -53,4 +53,10 @@ ynh_system_user_delete "$app"
sudo rm -rf "/home/$app"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_remove_nginx_config