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