mirror of
https://github.com/YunoHost-Apps/streams_ynh.git
synced 2024-09-03 20:26:20 +02:00
Make sure that restore & upgrade script also use required PHP version
This commit is contained in:
parent
ed49a7b086
commit
01430e1ef7
2 changed files with 8 additions and 4 deletions
|
@ -70,7 +70,9 @@ chown -R $app:www-data "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the MySQL database..."
|
ynh_script_progression --message="Restoring the database..."
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies_main
|
||||||
|
|
||||||
if [ $database -eq 1 ]; then
|
if [ $database -eq 1 ]; then
|
||||||
ynh_script_progression --message="Restoring MySQL database..."
|
ynh_script_progression --message="Restoring MySQL database..."
|
||||||
|
@ -78,10 +80,10 @@ if [ $database -eq 1 ]; then
|
||||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd
|
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd
|
||||||
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql
|
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql
|
||||||
elif [ $database -eq 2 ]; then
|
elif [ $database -eq 2 ]; then
|
||||||
# Removing postgresql database
|
# Reinstalling postgresql database
|
||||||
ynh_script_progression --message="Reinstalling dependencies..."
|
ynh_script_progression --message="Reinstalling dependencies..."
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies_psql
|
||||||
ynh_script_progression --message="Restoring the PostgreSQL database..."
|
ynh_script_progression --message="Restoring the PostgreSQL database..."
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||||
ynh_psql_test_if_first_run
|
ynh_psql_test_if_first_run
|
||||||
|
|
|
@ -200,8 +200,10 @@ chmod 644 "/etc/cron.d/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading dependencies..."
|
ynh_script_progression --message="Upgrading dependencies..."
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies_main
|
||||||
|
|
||||||
if [ $database -eq 2 ]; then
|
if [ $database -eq 2 ]; then
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies_psql
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue