diff --git a/scripts/restore b/scripts/restore index 1c385f9b..57c60f91 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,8 +66,8 @@ ynh_script_progression --message="Restoring the MySQL database..." --time --weig db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -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_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1b6d149f..6ede8432 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,12 +16,12 @@ ynh_script_progression --message="Loading installation settings..." --time --wei app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -upload=$(ynh_app_setting_get --app=$app --key=upload) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +domain=$(ynh_app_setting_get --app=$app domain) +path_url=$(ynh_app_setting_get --app=$app path) +final_path=$(ynh_app_setting_get --app=$app final_path) +upload=$(ynh_app_setting_get --app=$app upload) +db_name=$(ynh_app_setting_get --app=$app db_name) +db_pwd=$(ynh_app_setting_get --app=$app mysqlpwd) version=$(grep STD_VERSION $final_path/boot.php | cut -c 38- | rev | cut -c 5- | rev) last_update=$(grep update_time: /etc/yunohost/apps/$app/settings.yml | cut -c 14-)