From e2d54f993e989811d461894f77b1318ab47f922d Mon Sep 17 00:00:00 2001 From: David Stevens Date: Wed, 29 Jan 2014 14:03:16 -0500 Subject: [PATCH] Added --chdir to start-stop-daemon I needed to set the directory root of the node application for relevant file paths in various includes. There is a switch on start-stop-daemon that provides this capability. Other "how-to's" suggested setting `chdir /path/to/app` in the script part of the upstart conf but it was ignored by `start-stop-daemon`. --- examples/node-upstart.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/node-upstart.conf b/examples/node-upstart.conf index 2f6cd42..0a42a3d 100644 --- a/examples/node-upstart.conf +++ b/examples/node-upstart.conf @@ -24,4 +24,4 @@ end script respawn # Start the process -exec start-stop-daemon --start --chuid node --make-pidfile --pidfile /var/opt/node/run/node-upstart.pid --exec /home/node/local/node/bin/node -- /home/node/apps/node-upstart.js >> /var/opt/node/log/node-upstart.log 2>&1 \ No newline at end of file +exec start-stop-daemon --chdir /home/node/apps --start --chuid node --make-pidfile --pidfile /var/opt/node/run/node-upstart.pid --exec /home/node/local/node/bin/node -- /home/node/apps/node-upstart.js >> /var/opt/node/log/node-upstart.log 2>&1