added manager

This commit is contained in:
Neko-Life 2021-07-26 17:15:33 +07:00
parent fd1b586285
commit c60293b16d
2 changed files with 46 additions and 0 deletions

24
cmds/owner/reboot.js Normal file
View 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
View 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': ''
}
}
};