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

Merge pull request #66 from yalh76/database_actions_order

Database actions order
This commit is contained in:
Maniack Crudelis 2019-02-10 14:20:53 +01:00 committed by GitHub
commit ebbb675580
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View file

@ -41,13 +41,6 @@ fi
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE THE MYSQL DATABASE
#=================================================
@ -55,6 +48,13 @@ ynh_remove_app_dependencies
# Remove a database if it exists, along with the associated user
ynh_mysql_remove_db $db_user $db_name
#=================================================
# REMOVE DEPENDENCIES
#=================================================
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================

View file

@ -54,14 +54,6 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file "$final_path"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
db_pwd=$(ynh_app_setting_get $app mysqlpwd)
ynh_mysql_setup_db $db_name $db_name $db_pwd
ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
@ -91,6 +83,14 @@ ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf"
# Define and install dependencies
ynh_install_app_dependencies deb1 deb2
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
db_pwd=$(ynh_app_setting_get $app mysqlpwd)
ynh_mysql_setup_db $db_name $db_name $db_pwd
ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql
#=================================================
# RESTORE SYSTEMD
#=================================================