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

Fix logging upgrade and enable IPv6

This commit is contained in:
tituspijean 2021-05-15 10:43:35 +02:00
parent ce8050b5b7
commit c3fddb2aef
2 changed files with 12 additions and 2 deletions

View file

@ -122,6 +122,9 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --li
ynh_replace_string --match_string="<PublicPort>8096</PublicPort>" --replace_string="<PublicPort>$port</PublicPort>" --target_file="$config_path/network.xml"
ynh_replace_string --match_string="<HttpServerPortNumber>8096</HttpServerPortNumber>" --replace_string="<HttpServerPortNumber>$port</HttpServerPortNumber>" --target_file="$config_path/network.xml"
# Enable IPv6
ynh_replace_string --match_string="<EnableIPV6>false</EnableIPV6>" --replace_string="<EnableIPV6>true</EnableIPV6>" --target_file="$config_path/network.xml"
# BaseUrl config
ynh_replace_string --match_string="<BaseUrl />" --replace_string="<BaseUrl>$path_url</BaseUrl>" --target_file="$config_path/network.xml"

View file

@ -126,7 +126,7 @@ ynh_system_user_create --username=$app
#=================================================
# Check if network.xml exists (introduced in v10.7)
if [ -z "/etc/jellyfin/network.xml" ]; then
if [ -f "/etc/jellyfin/network.xml" ]; then
ynh_script_progression --message="Configuring the settings..." --weight=1
ynh_backup_if_checksum_is_different --file="$config_path/network.xml"
@ -140,6 +140,9 @@ if [ -z "/etc/jellyfin/network.xml" ]; then
ynh_replace_string --match_string="<PublicPort>8096</PublicPort>" --replace_string="<PublicPort>$port</PublicPort>" --target_file="$config_path/network.xml"
ynh_replace_string --match_string="<HttpServerPortNumber>8096</HttpServerPortNumber>" --replace_string="<HttpServerPortNumber>$port</HttpServerPortNumber>" --target_file="$config_path/network.xml"
# Enable IPv6
ynh_replace_string --match_string="<EnableIPV6>false</EnableIPV6>" --replace_string="<EnableIPV6>true</EnableIPV6>" --target_file="$config_path/network.xml"
# BaseUrl config
ynh_replace_string --match_string="<BaseUrl />" --replace_string="<BaseUrl>$path_url</BaseUrl>" --target_file="$config_path/network.xml"
@ -148,7 +151,11 @@ if [ -z "/etc/jellyfin/network.xml" ]; then
fi
# Lower logging verbosity
ynh_replace_string --match_string="\"Default\": \"Information\"" --replace_string="\"Default\": \"Error\"" --target_file="$config_path/logging.json"
# But first, if missing, copy it from its template
if [ ! -f "$config_path/logging.json" ]; then
cp "$config_path/logging.default.json" "$config_path/logging.json"
fi
ynh_exec_fully_quiet ynh_replace_string --match_string="\"Default\": \"Information\"" --replace_string="\"Default\": \"Error\"" --target_file="$config_path/logging.json"
#=================================================
# INSTALL LDAP PLUGIN