try to change directory before spawning forever process
This commit is contained in:
parent
c58d4ac879
commit
a9fb081848
1 changed files with 4 additions and 2 deletions
6
cli
6
cli
|
|
@ -10,8 +10,9 @@ var spawn = require('child_process').spawn,
|
|||
|
||||
function start() {
|
||||
|
||||
process.chdir(path.normalize(__dirname));
|
||||
|
||||
var child = spawn('forever', ['start', '-c', 'node', 'index.js', '-s'], {
|
||||
cwd: path.normalize(__dirname),
|
||||
env: process.env,
|
||||
detached: true
|
||||
});
|
||||
|
|
@ -25,8 +26,9 @@ function start() {
|
|||
|
||||
function stop() {
|
||||
|
||||
process.chdir(path.normalize(__dirname));
|
||||
|
||||
var child = spawn('forever', ['stop', '-c', 'node', 'index.js', '-s'], {
|
||||
cwd: path.normalize(__dirname),
|
||||
env: process.env,
|
||||
detached: true
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue