From 7848d96c55d60484b27fa19136b6a6a8fd10ec07 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 3 Nov 2020 16:18:14 +0100 Subject: [PATCH] Fix --- conf/systemd.service | 2 +- scripts/install | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 31beea6..da2f5de 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,7 @@ Group=__APP__ WorkingDirectory=__FINALPATH__ Environment="PATH=__ENV_PATH__" Environment="NODE_ENV=production" -ExecStart=__FINALPATH__/ethercalc --port __PORT__ --expire __EXPIRE__ +ExecStart=__YNH_NPM__ ethercalc --port __PORT__ --expire __EXPIRE__ RuntimeMaxSec=86400 Restart=always diff --git a/scripts/install b/scripts/install index c69f956..16f9650 100644 --- a/scripts/install +++ b/scripts/install @@ -110,8 +110,10 @@ popd || ynh_die #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_replace_string --match_string="__PORT__" --replace_string=$port --target_file=../conf/systemd.service -ynh_replace_string --match_string="__EXPIRE__" --replace_string=$expire --target_file=../conf/systemd.service +ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" +ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service" +ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/systemd.service" +ynh_replace_string --match_string="__EXPIRE__" --replace_string="$expire" --target_file="../conf/systemd.service" ynh_add_systemd_config