From 1502578da9c276e2a3351bb8486b359b8afc62d4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 27 Mar 2021 17:47:21 +0100 Subject: [PATCH] Fix --- conf/systemd.service | 2 +- scripts/install | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index b76bdd5..cd1dfb6 100755 --- 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=mynewwiki --listen port=__PORT__ #authenticated-user-header=basic +ExecStart=__YNH_NPM__ mynewwiki --listen port=__PORT__ #authenticated-user-header=basic #tiddlywiki mynewwiki --listen port=__PORT__ username=__ADMIN__ password=__PASSWORD__ Restart=always diff --git a/scripts/install b/scripts/install index 348daa0..5ee3979 100755 --- a/scripts/install +++ b/scripts/install @@ -108,7 +108,10 @@ pushd $final_path #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_add_systemd_config --others_var="ynh_node_load_PATH" +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_add_systemd_config #================================================= # GENERIC FINALIZATION