From 7791d2d820d40bcd1ef653aef80768e3f9b5234e Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 19 Nov 2023 22:52:20 +0100 Subject: [PATCH] Add node env in systemd unit + progression weight --- conf/systemd.service | 1 + scripts/install | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 7e268cf..1c55900 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -11,6 +11,7 @@ ExecStart=__INSTALL_DIR__/sandbox/run.sh StandardOutput=journal StandardError=journal EnvironmentFile=__INSTALL_DIR__/default.env +Environment="__YNH_NODE_LOAD_PATH__" # Sandboxing options to harden security # Depending on specificities of your service/app, you may need to tweak these diff --git a/scripts/install b/scripts/install index d372ace..2379431 100755 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,7 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=1 +ynh_script_progression --message="Setting up source files..." --weight=20 # Download, check integrity, uncompress and patch the source from manifest.toml ynh_setup_source --dest_dir="$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 2db493d..ce176b5 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading source files..." --weight=1 + ynh_script_progression --message="Upgrading source files..." --weight=20 # Download, check integrity, uncompress and patch the source from manifest.toml ynh_setup_source --dest_dir="$install_dir"