From 91c1c4fbb0d992d647bfa7b53f642896903e742d Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Wed, 23 Dec 2020 18:44:41 +0100 Subject: [PATCH] fix restore: create log path and file before chown call --- scripts/restore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index b0f4dad..1302c03 100755 --- a/scripts/restore +++ b/scripts/restore @@ -70,7 +70,6 @@ ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell #================================================= # Restore permissions on app files -chown -R "$app" "$log_path" chown -R "$app" "$public_path" chown -R "$app" "$final_path" @@ -111,7 +110,9 @@ yunohost service add $app --description="Web based management to catalog things" # RESTORE THE LOGROTATE CONFIGURATION #================================================= -mkdir -p "/var/log/$app" +mkdir -p "$log_path" +touch "${log_file}" +chown -R "$app" "$log_path" ynh_restore_file --origin_path="/etc/logrotate.d/$app" #=================================================