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

Update restore

This commit is contained in:
Éric Gaspar 2023-03-24 13:32:45 +01:00
parent 6326deb26b
commit 6cb8aeef2b

View file

@ -10,6 +10,14 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..." --weight=1
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -44,9 +52,6 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
ynh_script_progression --message="Restoring the MongoDB database..."
db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name
ynh_mongo_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
ynh_mongo_restore_db --database="$db_name" < ./dump.bson
#=================================================