From 22785a05fc60922bb9719dcd07f7d055b336cec6 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 15 May 2021 10:59:49 +0200 Subject: [PATCH] Make user file permissions are correct before starting services --- scripts/install | 3 +++ scripts/upgrade | 3 +++ 2 files changed, 6 insertions(+) diff --git a/scripts/install b/scripts/install index 1e1adb2..128e5c0 100644 --- a/scripts/install +++ b/scripts/install @@ -114,6 +114,9 @@ fi #================================================= ynh_script_progression --message="Configuring the settings..." --weight=1 +# Set permissions to app files +chown -R $app: $final_path + # Load services once to generate system.xml ynh_systemd_action --service_name=$app --action="restart" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15 diff --git a/scripts/upgrade b/scripts/upgrade index 5e33279..ef26d66 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,6 +132,9 @@ if [ -f "/etc/jellyfin/network.xml" ]; then ynh_backup_if_checksum_is_different --file="$config_path/network.xml" ynh_backup_if_checksum_is_different --file="$config_path/system.xml" + # Set permissions to app files + chown -R $app: $final_path + # Load services once to generate network.xml ynh_systemd_action --service_name=$app --action="restart" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15