mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-12 11:30:01 -04:00
Minor adjustments to commands.
This commit is contained in:
parent
3f6872f810
commit
3fa63b817c
2 changed files with 10 additions and 7 deletions
|
@ -9,9 +9,10 @@
|
|||
"restart": "node run-command.mjs stop start",
|
||||
"stop": "node run-command.mjs stop",
|
||||
"test": "npm run proxy-validator",
|
||||
"pm2-start": "pm2 start ecosystem.config.js --env production",
|
||||
"pm2-start": "pm2 start ecosystem.config.js --env production --watch false",
|
||||
"pm2-stop": "pm2 stop ecosystem.config.js",
|
||||
"pm2-monit": "pm2 monit",
|
||||
"pm2-nuke": "pm2 delete ecosystem.config.js",
|
||||
"manual-start": "node run-command.mjs start",
|
||||
"kill": "node run-command.mjs stop kill",
|
||||
"build": "node run-command.mjs build && cd lib/rammerhead && npm install && npm run build",
|
||||
|
|
|
@ -20,14 +20,14 @@ const shutdown = fileURLToPath(new URL("./src/.shutdown", import.meta.url));
|
|||
|
||||
for(let i = 2; i < process.argv.length; i++)
|
||||
switch (process.argv[i]) {
|
||||
case "start": {
|
||||
case "start":
|
||||
if (config.production)
|
||||
exec("npm run pm2-start", (error, stdout) => {
|
||||
if (error) throw error;
|
||||
console.log(stdout);
|
||||
});
|
||||
else if (process.platform === "win32")
|
||||
exec("START", ["/MIN", '""', '"node backend.js"'], (error, stdout) => {
|
||||
exec('START /MIN "" "node backend.js"', (error, stdout) => {
|
||||
if (error) throw error;
|
||||
console.log(stdout);
|
||||
});
|
||||
|
@ -39,7 +39,6 @@ for(let i = 2; i < process.argv.length; i++)
|
|||
server.disconnect();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "stop":
|
||||
await writeFile(shutdown, "");
|
||||
|
@ -83,10 +82,13 @@ for(let i = 2; i < process.argv.length; i++)
|
|||
|
||||
case "kill":
|
||||
if (process.platform === "win32")
|
||||
exec("taskkill", ["/F", "/IM", "node*"], (error, stdout) => {
|
||||
exec("taskkill /F /IM node*", (error, stdout) => {
|
||||
console.log(stdout);
|
||||
});
|
||||
else exec("pkill", ["node"], (error, stdout) => {
|
||||
else exec("pkill node", (error, stdout) => {
|
||||
console.log(stdout);
|
||||
});
|
||||
exec("npm run pm2-nuke", (error, stdout) => {
|
||||
console.log(stdout);
|
||||
});
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue