mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
Ensure network configuration for 10.7
This commit is contained in:
parent
25889de723
commit
8f2150def7
2 changed files with 25 additions and 2 deletions
|
@ -99,10 +99,11 @@ 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"
|
||||
ynh_replace_string --match_string="<PublicPort>8096</PublicPort>" --replace_string="<PublicPort>$port</PublicPort>" --target_file="/etc/jellyfin/network.xml"
|
||||
ynh_replace_string --match_string="<HttpServerPortNumber>8096</HttpServerPortNumber>" --replace_string="<HttpServerPortNumber>$port</HttpServerPortNumber>" --target_file="/etc/jellyfin/network.xml"
|
||||
|
||||
# BaseUrl config
|
||||
ynh_replace_string --match_string="<BaseUrl />" --replace_string="<BaseUrl>$path_url</BaseUrl>" --target_file="/etc/jellyfin/system.xml"
|
||||
ynh_replace_string --match_string="<BaseUrl />" --replace_string="<BaseUrl>$path_url</BaseUrl>" --target_file="/etc/jellyfin/network.xml"
|
||||
|
||||
# Disable Setup Wizard
|
||||
ynh_replace_string --match_string="<IsStartupWizardCompleted>false</IsStartupWizardCompleted>" --replace_string="<IsStartupWizardCompleted>true</IsStartupWizardCompleted>" --target_file="/etc/jellyfin/system.xml"
|
||||
|
|
|
@ -74,6 +74,28 @@ ynh_script_progression --message="Making sure dedicated system user exists..." -
|
|||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
||||
# Check if network.xml exists (introduced in v10.7)
|
||||
if [ -z "/etc/jellyfin/network.xml" ]; then
|
||||
ynh_script_progression --message="Configuring the settings..." --weight=1
|
||||
|
||||
# Load services once to generate network.xml
|
||||
systemctl enable jellyfin
|
||||
systemctl start jellyfin
|
||||
sleep 5
|
||||
systemctl stop jellyfin
|
||||
|
||||
# Port config
|
||||
ynh_replace_string --match_string="<PublicPort>8096</PublicPort>" --replace_string="<PublicPort>$port</PublicPort>" --target_file="/etc/jellyfin/network.xml"
|
||||
ynh_replace_string --match_string="<HttpServerPortNumber>8096</HttpServerPortNumber>" --replace_string="<HttpServerPortNumber>$port</HttpServerPortNumber>" --target_file="/etc/jellyfin/network.xml"
|
||||
|
||||
# BaseUrl config
|
||||
ynh_replace_string --match_string="<BaseUrl />" --replace_string="<BaseUrl>$path_url</BaseUrl>" --target_file="/etc/jellyfin/network.xml"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# INSTALL LDAP PLUGIN
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue