From 6b69c6d6c7fe6d2008c2e09be1da624d23ca5636 Mon Sep 17 00:00:00 2001 From: Yalh Date: Mon, 28 Jan 2019 20:21:17 +0100 Subject: [PATCH] Adding Node and typescript --- scripts/install | 4 ++++ scripts/remove | 4 ++++ scripts/restore | 4 ++++ scripts/upgrade | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/scripts/install b/scripts/install index 700dcfd..e8c581b 100644 --- a/scripts/install +++ b/scripts/install @@ -168,6 +168,10 @@ ynh_system_user_create $app # ... #================================================= +ynh_install_nodejs +ynh_use_nodejs +npm install -g typescript + #================================================= # SETUP SYSTEMD #================================================= diff --git a/scripts/remove b/scripts/remove index 97fb525..3505ae1 100644 --- a/scripts/remove +++ b/scripts/remove @@ -99,6 +99,10 @@ fi # REMOVE THE CRON FILE #================================================= +ynh_use_nodejs +npm uninstall -g typescript +ynh_remove_nodejs + # Remove a cron file #ynh_secure_remove "/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index 97d9932..dadbcf9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -91,6 +91,10 @@ chown -R root: $final_path # Define and install dependencies #ynh_install_app_dependencies deb1 deb2 +ynh_install_nodejs +ynh_use_nodejs +npm install -g typescript + #================================================= # RESTORE SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 132ae4f..3beeacc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -110,6 +110,10 @@ ynh_system_user_create $app # ... #================================================= +ynh_install_nodejs +ynh_use_nodejs +npm install -g typescript + ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. #ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE"