From 3ed03fd6f765f40387481072357a2b624f236754 Mon Sep 17 00:00:00 2001 From: Daniel Theophanes Date: Sun, 19 Apr 2015 17:25:11 -0700 Subject: [PATCH] upstart: add working dir and chroot dir. --- service_upstart_linux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/service_upstart_linux.go b/service_upstart_linux.go index 63ab325..b3190e1 100644 --- a/service_upstart_linux.go +++ b/service_upstart_linux.go @@ -150,6 +150,8 @@ const upstartScript = `# {{.Description}} {{if .DisplayName}}description "{{.DisplayName}}"{{end}} kill signal INT +{{if .ChRoot}}chroot {{.ChRoot}}{{end}} +{{if .WorkingDirectory}}chdir {{.WorkingDirectory}}{{end}} start on filesystem or runlevel [2345] stop on runlevel [!2345]