From ef9b3c15f4a516e4194ea9d7f9c7a035afc9b1ae Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 05:29:13 +0100 Subject: [PATCH] Cleanup --- scripts/install | 7 +++---- scripts/restore | 6 +++--- scripts/upgrade | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 4adeb69..17341a5 100644 --- a/scripts/install +++ b/scripts/install @@ -97,13 +97,12 @@ 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 -ynh_install_nodejs 10 - 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_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_nodejs 10 +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= # CREATE A POSTGRESQL DATABASE @@ -336,4 +335,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost:" +ynh_systemd_action --action=start --service_name=$app diff --git a/scripts/restore b/scripts/restore index 804658a..a4bec38 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,11 +92,11 @@ chown -R "$app":"$app" "$final_path" #================================================= # Define and install dependencies -ynh_install_nodejs 10 - 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 #================================================= @@ -145,4 +145,4 @@ chown -R "$app":"$app" "/var/log/$app" # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost:" +ynh_systemd_action --action=start --service_name=$app diff --git a/scripts/upgrade b/scripts/upgrade index 29d1780..43b9328 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,11 +102,11 @@ ynh_add_nginx_config # UPGRADE DEPENDENCIES #================================================= -ynh_install_nodejs 10 - 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 #================================================= @@ -203,4 +203,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost:" +ynh_systemd_action --action=start --service_name=$app