diff --git a/scripts/install b/scripts/install index 9fc1369..16aea8e 100755 --- a/scripts/install +++ b/scripts/install @@ -84,9 +84,9 @@ ynh_script_progression --message="Configuring system user..." --weight=1 ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= -# CREATE A POSTGRESQL DATABASE +# CREATE A DATABASE #================================================= -ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 +ynh_script_progression --message="Creating a database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) db_user=$db_name @@ -136,7 +136,6 @@ pushd $final_path ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn update-db popd - #================================================= # SETUP SYSTEMD #================================================= diff --git a/scripts/remove b/scripts/remove index b337ab2..5490de6 100755 --- a/scripts/remove +++ b/scripts/remove @@ -52,9 +52,9 @@ ynh_script_progression --message="Removing logrotate configuration..." --weight= ynh_remove_logrotate #================================================= -# REMOVE THE POSTGRESQL DATABASE +# REMOVE THE DATABASE #================================================= -ynh_script_progression --message="Removing the PostgreSQL database..." --weight=2 +ynh_script_progression --message="Removing the database..." --weight=2 # Remove a database if it exists, along with the associated user ynh_psql_remove_db --db_user=$db_user --db_name=$db_name diff --git a/scripts/restore b/scripts/restore index b6834eb..ec542e4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -76,6 +76,9 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version +# Install Yarn +ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" + #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= @@ -84,14 +87,9 @@ ynh_script_progression --message="Restoring the NGINX web server configuration.. ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= -# RESTORE THE MYSQL DATABASE +# RESTORE THE DATABASE #================================================= -ynh_script_progression --message="Restoring the MySQL database..." --time --weight=1 - -#================================================= -# RESTORE THE POSTGRESQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6 +ynh_script_progression --message="Restoring the database..." --weight=6 ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd diff --git a/scripts/upgrade b/scripts/upgrade index 62a67ac..1464a37 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -81,10 +81,14 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Upgrading dependencies..." --weight=10 ynh_install_app_dependencies $pkg_dependencies + # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs +# Install Yarn +ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" + #================================================= # NGINX CONFIGURATION #=================================================