From 53d244d9266545443f2e41d649d85bb07d117576 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 9 May 2024 11:37:12 +0700 Subject: [PATCH] Test --- scripts/backup | 1 + scripts/restore | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/backup b/scripts/backup index af6b2dc..4d90835 100755 --- a/scripts/backup +++ b/scripts/backup @@ -20,6 +20,7 @@ ynh_print_info --message="Declaring files to be backed up..." #================================================= ynh_backup --src_path="/home/yunohost.app/$app/app" +ynh_backup --src_path="/home/yunohost.app/$app/.ssh" #================================================= # BACKUP THE REPOS DIRECTORY diff --git a/scripts/restore b/scripts/restore index 9969e31..10a0863 100755 --- a/scripts/restore +++ b/scripts/restore @@ -18,14 +18,14 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= mkdir -p "/home/yunohost.app/$app" && chmod 700 "/home/yunohost.app/$app" ynh_restore_file --origin_path="/home/yunohost.app/$app/app" - -chown -R $app:www-data "/home/yunohost.app/$app/app" +ynh_restore_file --origin_path="/home/yunohost.app/$app/.ssh" ynh_restore_file --origin_path="/home/yunohost.app/$app/repos" --not_mandatory -chown -R $app:www-data "/home/yunohost.app/$app/repos" - chmod -R 700 "/home/yunohost.app/$app" +chmod 600 "/home/yunohost.app/$app/.ssh/authorized_keys" + +chown -R $app:www-data "/home/yunohost.app/$app" #================================================= # REINSTALL DEPENDENCIES