From 86fe9f876fc53c8b4df628d1af884659ca70759c Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 14 Feb 2018 10:54:44 +0100 Subject: [PATCH] library/roles/stanford-corenlp: Fixes to the startup scripts. We have to rely on the upstart 'chdir' directive to change the working directory. --- stanford-corenlp/templates/stanford-corenlp.upstart.j2 | 3 ++- stanford-corenlp/templates/tint.upstart.j2 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stanford-corenlp/templates/stanford-corenlp.upstart.j2 b/stanford-corenlp/templates/stanford-corenlp.upstart.j2 index f2f34aac..15dd1495 100644 --- a/stanford-corenlp/templates/stanford-corenlp.upstart.j2 +++ b/stanford-corenlp/templates/stanford-corenlp.upstart.j2 @@ -6,7 +6,8 @@ respawn respawn limit 10 5 setuid {{ stanford_corenlp_user }} setgid {{ stanford_corenlp_user }} +chdir {{ stanford_corenlp_dist_dir }} script - exec cd {{ stanford_corenlp_dist_dir }} {{ stanford_corenlp_cmd }} > {{ stanford_corenlp_log_dir }}/corenlp.log 2>&1 + exec {{ stanford_corenlp_cmd }} > {{ stanford_corenlp_log_dir }}/corenlp.log 2>&1 end script diff --git a/stanford-corenlp/templates/tint.upstart.j2 b/stanford-corenlp/templates/tint.upstart.j2 index 48798252..2c21ae55 100644 --- a/stanford-corenlp/templates/tint.upstart.j2 +++ b/stanford-corenlp/templates/tint.upstart.j2 @@ -6,7 +6,8 @@ respawn respawn limit 10 5 setuid {{ stanford_corenlp_user }} setgid {{ stanford_corenlp_user }} +chdir {{ stanford_corenlp_dist_dir }}/tint script - exec cd {{ stanford_corenlp_dist_dir }}/tint {{ tint_service_cmd }} > {{ stanford_corenlp_log_dir }}/tint.log 2>&1 + exec {{ tint_service_cmd }} > {{ stanford_corenlp_log_dir }}/tint.log 2>&1 end script