mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
Nginx path (#3)
* [fix] enforce port in system.xml Closes #6 * [enh] installation on path Closes #7
This commit is contained in:
parent
2e444078df
commit
111c42d2f3
2 changed files with 14 additions and 7 deletions
|
@ -1,7 +1,3 @@
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
########
|
########
|
||||||
## Jellyfin
|
## Jellyfin
|
||||||
|
|
||||||
|
@ -9,10 +5,10 @@ location / {
|
||||||
return 302 $scheme://$host/jellyfin/;
|
return 302 $scheme://$host/jellyfin/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /jellyfin/ {
|
location __PATH__/ {
|
||||||
# Proxy main Jellyfin traffic
|
# Proxy main Jellyfin traffic
|
||||||
# The / at the end is significant.
|
# The / at the end is significant.
|
||||||
proxy_pass http://127.0.0.1:__PORT__/;
|
proxy_pass http://127.0.0.1:__PORT____PATH__/;
|
||||||
|
|
||||||
proxy_pass_request_headers on;
|
proxy_pass_request_headers on;
|
||||||
|
|
||||||
|
|
|
@ -168,6 +168,18 @@ cp ../conf/LDAP-Auth.xml "$plugins_conf_file"
|
||||||
ynh_replace_string --match_string="__BINDPASSWORD__" --replace_string="$password" --target_file="$plugins_conf_file"
|
ynh_replace_string --match_string="__BINDPASSWORD__" --replace_string="$password" --target_file="$plugins_conf_file"
|
||||||
chown -R jellyfin:jellyfin "$plugins_path"
|
chown -R jellyfin:jellyfin "$plugins_path"
|
||||||
|
|
||||||
|
# Load services once to generate system.xml
|
||||||
|
systemctl enable jellyfin
|
||||||
|
systemctl start jellyfin
|
||||||
|
sleep 5
|
||||||
|
systemctl stop jellyfin
|
||||||
|
|
||||||
|
# Port config
|
||||||
|
ynh_replace_string --match_string="<HttpServerPortNumber>8096</HttpServerPortNumber>" --replace_string="<HttpServerPortNumber>$port</HttpServerPortNumber>" --target_file="/etc/jellyfin/system.xml"
|
||||||
|
|
||||||
|
# BaseUrl
|
||||||
|
ynh_replace_string --match_string="<BaseUrl />" --replace_string="<BaseUrl>$path_url</BaseUrl>" --target_file="/etc/jellyfin/system.xml"
|
||||||
|
|
||||||
# Port config
|
# Port config
|
||||||
ynh_replace_string --match_string="<HttpServerPortNumber>8096</HttpServerPortNumber>" --replace_string="<HttpServerPortNumber>$port</HttpServerPortNumber>" --target_file="/etc/jellyfin/system.xml"
|
ynh_replace_string --match_string="<HttpServerPortNumber>8096</HttpServerPortNumber>" --replace_string="<HttpServerPortNumber>$port</HttpServerPortNumber>" --target_file="/etc/jellyfin/system.xml"
|
||||||
|
|
||||||
|
@ -208,6 +220,5 @@ if [ $is_public -eq 1 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Reload services
|
# Reload services
|
||||||
systemctl enable jellyfin
|
|
||||||
systemctl start jellyfin
|
systemctl start jellyfin
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
|
Loading…
Add table
Reference in a new issue