From 63b439a03210648dd19c7fff2f2e74687b6ccaad Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 9 Aug 2021 23:25:12 +0200 Subject: [PATCH] Fix --- scripts/backup | 2 +- scripts/restore | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 7ed3c7f..1a1944a 100755 --- a/scripts/backup +++ b/scripts/backup @@ -64,7 +64,7 @@ ynh_mysql_dump_db --database="$db_name" > db.sql # BACKUP LOGROTATE #================================================= -ynh_backup "/etc/logrotate.d/$app" +ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= # BACKUP FAIL2BAN CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 44f8384..2888599 100755 --- a/scripts/restore +++ b/scripts/restore @@ -134,6 +134,10 @@ mkdir -p "$datadir" # Fix app ownerships & permissions chown -R $app: "$final_path" "$datadir" +find $final_path/ -type f -print0 | xargs -0 chmod 0644 +find $final_path/ -type d -print0 | xargs -0 chmod 0755 +find $datadir/ -type f -print0 | xargs -0 chmod 0640 +find $datadir/ -type d -print0 | xargs -0 chmod 0750 chmod 640 "$final_path/config/config.php" chmod 755 /home/yunohost.app