1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/piwigo_ynh.git synced 2024-09-03 20:06:03 +02:00

Merge pull request #19 from YunoHost-Apps/testing

Testing
This commit is contained in:
JimboJoe 2018-04-16 18:39:52 +02:00 committed by GitHub
commit fe5ab39372
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -42,7 +42,7 @@ ynh_backup "$final_path"
backup_core_only=$(ynh_app_setting_get "$app" backup_core_only) backup_core_only=$(ynh_app_setting_get "$app" backup_core_only)
if [ -z $backup_core_only ] # If backup_core_only setting set, don't backup data directory if [ -z $backup_core_only ] # If backup_core_only setting set, don't backup data directory
then then
ynh_backup /home/yunohost.app/${app} ynh_backup /home/yunohost.app/${app}/upload
else else
echo "Data dir won't be saved, because backup_core_only is set." >&2 echo "Data dir won't be saved, because backup_core_only is set." >&2
# Remove the option so that next regular backup will be complete # Remove the option so that next regular backup will be complete

View file

@ -54,12 +54,14 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file "$final_path" ynh_restore_file "$final_path"
# Restore data directory if backed-up # Restore data directory if backed-up
if [ -d "$YNH_BACKUP_DIR/apps/${app}/backup/home/yunohost.app/${app}" ] ; then if [ -d "$YNH_BACKUP_DIR/apps/${app}/backup/home/yunohost.app/${app}/upload" ] ; then
ynh_restore_file "/home/yunohost.app/${app}" ynh_restore_file "/home/yunohost.app/${app}/upload"
else else
# Create app folders # Create app data folder
mkdir /home/yunohost.app/${app}/_data /home/yunohost.app/${app}/upload mkdir /home/yunohost.app/${app}/upload
fi fi
# Create temporary data folder
mkdir -p /home/yunohost.app/${app}/_data
# Remove the option backup_core_only if it's in the settings.yml file # Remove the option backup_core_only if it's in the settings.yml file
ynh_app_setting_delete $app backup_core_only ynh_app_setting_delete $app backup_core_only