1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

make sure the log folder exists before moving the logs to it

This commit is contained in:
OniriCorpe 2024-03-01 21:38:35 +01:00
parent 880d6459a0
commit 191e4ad13c
2 changed files with 3 additions and 1 deletions

View file

@ -5,7 +5,7 @@ name = "Nextcloud"
description.en = "Online storage, file sharing platform and various other applications"
description.fr = "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
version = "28.0.3~ynh1"
version = "28.0.3~ynh2"
maintainers = ["kay0u"]

View file

@ -242,6 +242,8 @@ then
# it would be better in the ENSURE DOWNWARD COMPATIBILITY section
# but it must be after the exec_occ() definition, so it's here
if [ -f "$data_dir/data/nextcloud.log" ]; then
mkdir -p "/var/log/$app"
chmod 750 "/var/log/$app"
mv "$data_dir"/data/nextcloud.log* "/var/log/$app"
# adapt the nextcloud config
exec_occ config:system:set logfile --value="/var/log/$app/nextcloud.log"