mirror of
https://github.com/danbulant/Shasha
synced 2026-05-19 03:58:38 +00:00
added manager
This commit is contained in:
parent
fd1b586285
commit
c60293b16d
2 changed files with 46 additions and 0 deletions
24
cmds/owner/reboot.js
Normal file
24
cmds/owner/reboot.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
const commando = require("@iceprod/discord.js-commando"),
|
||||
{ exec } = require("child_process"),
|
||||
{ errLog, trySend } = require("../../resources/functions");
|
||||
|
||||
module.exports = class reboot extends commando.Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: "reboot",
|
||||
memberName: "reboot",
|
||||
group: "owner",
|
||||
description: "Reboot Shasha.",
|
||||
ownerOnly: true,
|
||||
guarded: true
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
await trySend(msg.client, msg, "Cyaa~");
|
||||
exec("pm2 restart --name shasha");
|
||||
process.exit();
|
||||
}
|
||||
}
|
||||
22
ecosystem.config.js
Normal file
22
ecosystem.config.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
module.exports = {
|
||||
apps: [{
|
||||
script: 'Main.js',
|
||||
watch: '.'
|
||||
}, {
|
||||
script: './service-worker/',
|
||||
watch: ['./service-worker']
|
||||
}],
|
||||
|
||||
deploy: {
|
||||
production: {
|
||||
user: 'SSH_USERNAME',
|
||||
host: 'SSH_HOSTMACHINE',
|
||||
ref: 'origin/master',
|
||||
repo: 'GIT_REPOSITORY',
|
||||
path: 'DESTINATION_PATH',
|
||||
'pre-deploy-local': '',
|
||||
'post-deploy': 'npm install && pm2 reload ecosystem.config.js --env production',
|
||||
'pre-setup': ''
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue