diff --git a/scripts/upgrade b/scripts/upgrade index 6a66c7a..2c72ad2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,19 +18,19 @@ ynh_script_progression --message="Checking version..." --weight=1 upgrade_type=$(ynh_check_app_version_changed) # If db_name doesn't exist, create it -if [ -z "$db_name" ]; then +if [ -z "${db_name:-}" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) fi # If data_dir doesn't exist, create it -if [ -z "$data_dir" ]; then +if [ -z "${data_dir:-}" ]; then data_dir=/home/yunohost.app/$app fi #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 ynh_add_fpm_config @@ -56,9 +56,9 @@ then ynh_exec_as $app env PATH=$PATH drush @$app dis framaforms_spam ynh_exec_as $app env PATH=$PATH drush @$app pm-uninstall framaforms_spam popd - update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION} - + update-alternatives --set php /usr/bin/php${YNH_PHP_VERSION} fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================