Skip to content

Commit

Permalink
fix pm2 command sequence (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
akimasa authored and kanreisa committed Sep 2, 2016
1 parent a3a638c commit 83d2ac9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bin/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ if (process.platform === "linux" || process.platform === "darwin") {

// pm2

child_process.execSync("pm2 start processes.json", {
stdio: [
null,
process.stdout,
process.stderr
]
});

let platform = "";

if (fs.existsSync("/usr/bin/systemctl") === true) {
Expand All @@ -70,6 +62,14 @@ if (process.platform === "linux" || process.platform === "darwin") {
]
});

child_process.execSync("pm2 start processes.json", {
stdio: [
null,
process.stdout,
process.stderr
]
});

child_process.execSync("pm2 save", {
stdio: [
null,
Expand Down Expand Up @@ -134,4 +134,4 @@ if (process.platform === "linux" || process.platform === "darwin") {

function copyFileSync(src, dest) {
fs.writeFileSync(dest, fs.readFileSync(src));
}
}

0 comments on commit 83d2ac9

Please sign in to comment.