1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bookstack_ynh.git synced 2024-09-03 18:16:02 +02:00
This commit is contained in:
ericgaspar 2021-11-30 15:53:44 +01:00
parent 6560c79d2b
commit 959bd62172
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 17 additions and 19 deletions

View file

@ -30,14 +30,6 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1
# Remove a database if it exists, along with the associated user
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE THE REDIS DATABASE
#=================================================
@ -69,6 +61,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -34,8 +34,7 @@ phpversion=$YNH_PHP_VERSION
#=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=1
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS

View file

@ -69,17 +69,16 @@ then
cp -a "$final_path/storage/uploads" "$tmpdir/storage/uploads"
# Remove the app directory securely
ynh_secure_remove --file=$final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
ynh_secure_remove --file=$final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
cp -a "$tmpdir/.env " "$final_path/.env "
cp -a "$tmpdir/public/uploads" "$final_path/public/uploads"
cp -a "$tmpdir/storage/uploads" "$final_path/storage/uploads"
cp -a "$tmpdir/.env " "$final_path/.env "
cp -a "$tmpdir/public/uploads" "$final_path/public/uploads"
cp -a "$tmpdir/storage/uploads" "$final_path/storage/uploads"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/.env $final_path/public/uploads $final_path/storage/uploads"