diff --git a/scripts/install b/scripts/install index 5fc49f9..ee20d52 100644 --- a/scripts/install +++ b/scripts/install @@ -16,6 +16,7 @@ source /usr/share/yunohost/helpers ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. + read -p "Press any key..." ynh_clean_check_starting } # Exit if an error occurs during the execution of the script @@ -97,12 +98,9 @@ ynh_app_setting_set $app port $port ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_app_dependencies redis-server postgresql postgresql-contrib #================================================= # CREATE A POSTGRESQL DATABASE @@ -192,7 +190,7 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path yarn install + sudo -u $app env PATH=$PATH:$nodejs_path npm install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd diff --git a/scripts/remove b/scripts/remove index d49e468..9f2ab84 100644 --- a/scripts/remove +++ b/scripts/remove @@ -57,7 +57,6 @@ ynh_psql_remove_db "$db_name" "$db_name" ynh_remove_app_dependencies ynh_use_nodejs ynh_remove_nodejs -rm -rf "/etc/apt/sources.list.d/yarn.list" #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/restore b/scripts/restore index a4bec38..0d0c4d8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,12 +92,10 @@ chown -R "$app":"$app" "$final_path" #================================================= # Define and install dependencies -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_app_dependencies redis-server postgresql postgresql-contrib #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 4efb517..42da3b5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,12 +102,9 @@ ynh_add_nginx_config # UPGRADE DEPENDENCIES #================================================= -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_app_dependencies redis-server postgresql postgresql-contrib #================================================= # CREATE DEDICATED USER @@ -133,7 +130,7 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path yarn install + sudo -u $app env PATH=$PATH:$nodejs_path npm install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd