diff --git a/scripts/upgrade b/scripts/upgrade index d5c76db..cee28e6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,6 +66,8 @@ ynh_script_progression --message="Backing up the data before upgrading (may take bdd=$final_path/association.sqlite squelettes=$final_path/www/squelettes +data=$final_path/data +skel_dist=$final_path/www/skel-dist if [ -d "$squelettes" ]; then cp -ar $squelettes /tmp/squelettes @@ -75,6 +77,14 @@ if [ -e "$bdd" ]; then cp -a $bdd /tmp/association.sqlite fi +if [ -d "$data" ]; then + cp -ar $data /tmp/data +fi + +if [ -d "$skel_dist" ]; then + cp -ar $skel_dist /tmp/skel-dist +fi + #================================================= # UPGRADE TO 0.9.8 if necessary #================================================= @@ -212,6 +222,8 @@ ynh_script_progression --message="restore data..." --weight=10 backup_bdd=/tmp/association.sqlite backup_squelettes=/tmp/squelettes +backup_data=/tmp/data +backup_skel_dist=/tmp/skel-dist if [ -d "$backup_squelettes" ] then @@ -225,6 +237,19 @@ then ynh_secure_remove $backup_bdd fi +if [ -d "$backup_data" ] +then + cp -ar $backup_data $final_path/data + ynh_secure_remove $backup_data +fi + +if [ -d "$backup_skel_dist" ] +then + cp -ar $backup_skel_dist $final_path/www/skel-dist + ynh_secure_remove $backup_skel_dist +fi + + #================================================= # ADD A CONFIGURATION #=================================================