diff --git a/scripts/install b/scripts/install index 747d746..c37f768 100644 --- a/scripts/install +++ b/scripts/install @@ -89,6 +89,13 @@ port=$(ynh_find_port 8095) #ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port ynh_app_setting_set $app port $port +#================================================= +# INSTALL YARN 1.13.0 +#================================================= +ynh_print_info "Installing yarn 1.13.0..." + +sudo apt install -y ../sources/yarn_1.13.0_all.deb + #================================================= # INSTALL DEPENDENCIES #================================================= @@ -101,12 +108,9 @@ ynh_print_info "Installing dependencies..." ### - 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 yarn redis-server postgresql postgresql-contrib build-essential +ynh_install_app_dependencies redis-server postgresql postgresql-contrib build-essential #================================================= # CREATE A POSTGRESQL DATABASE @@ -347,7 +351,7 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Redis connection:" +ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost" #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index 29abf27..9912b15 100644 --- a/scripts/remove +++ b/scripts/remove @@ -62,7 +62,12 @@ ynh_remove_app_dependencies ynh_use_nodejs ynh_remove_nodejs -ynh_secure_remove "/etc/apt/sources.list.d/yarn.list" +#================================================= +# REMOVE YARN 1.13.0 +#================================================= +ynh_print_info "Removing yarn 1.13.0..." + +sudo apt remove -y yarn #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/restore b/scripts/restore index 37fca03..582e508 100644 --- a/scripts/restore +++ b/scripts/restore @@ -89,12 +89,9 @@ ynh_print_info "Reinstalling dependencies..." # 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 yarn redis-server postgresql postgresql-contrib build-essential +ynh_install_app_dependencies redis-server postgresql postgresql-contrib build-essential #================================================= # RESTORE THE POSTGRESQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index d7049c9..b6edd2a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,6 +53,9 @@ if [ -z $final_path ]; then ynh_app_setting_set $app final_path $final_path fi +# Remove yarn repository +ynh_secure_remove "/etc/apt/sources.list.d/yarn.list" + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -99,17 +102,21 @@ ynh_print_info "Upgrading nginx web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config +#================================================= +# INSTALL YARN 1.13.0 +#================================================= +ynh_print_info "Installing yarn 1.13.0..." + +sudo apt install -y ../sources/yarn_1.13.0_all.deb + #================================================= # UPGRADE DEPENDENCIES #================================================= ynh_print_info "Upgrading 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 yarn redis-server postgresql postgresql-contrib build-essential +ynh_install_app_dependencies redis-server postgresql postgresql-contrib build-essential #================================================= # CREATE DEDICATED USER diff --git a/sources/yarn_1.13.0_all.deb b/sources/yarn_1.13.0_all.deb new file mode 100644 index 0000000..fe88e47 Binary files /dev/null and b/sources/yarn_1.13.0_all.deb differ