diff --git a/scripts/install b/scripts/install index 556ef08..1e1adb2 100644 --- a/scripts/install +++ b/scripts/install @@ -122,6 +122,9 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --li ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" +# Enable IPv6 +ynh_replace_string --match_string="false" --replace_string="true" --target_file="$config_path/network.xml" + # BaseUrl config ynh_replace_string --match_string="" --replace_string="$path_url" --target_file="$config_path/network.xml" diff --git a/scripts/upgrade b/scripts/upgrade index 39ebbe5..5e33279 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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="8096" --replace_string="$port" --target_file="$config_path/network.xml" ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" + # Enable IPv6 + ynh_replace_string --match_string="false" --replace_string="true" --target_file="$config_path/network.xml" + # BaseUrl config ynh_replace_string --match_string="" --replace_string="$path_url" --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