new cscli cmd
parent
ea35c19844
commit
4d02a5feef
|
@ -7,7 +7,7 @@ export default class SystemD_Restart extends Command {
|
|||
this.name = 'restart';
|
||||
this.description = `Restarts a SystemD user service, if the service has never been started or isn't running use \`${this.client.config.prefix}systemd start <service name>\`.`;
|
||||
this.usage = `${this.client.config.prefix}systemd restart <service name>`;
|
||||
this.enabled = true;
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
public async run(message: Message, args: string[]) {
|
||||
|
|
|
@ -7,7 +7,7 @@ export default class SystemD_Start extends Command {
|
|||
this.name = 'start';
|
||||
this.description = `Starts a SystemD user service, if the service is already running use \`${this.client.config.prefix}systemd restart <service name>\`.`;
|
||||
this.usage = `${this.client.config.prefix}systemd start <service name>`;
|
||||
this.enabled = true;
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
public async run(message: Message, args: string[]) {
|
||||
|
|
|
@ -7,7 +7,7 @@ export default class SystemD_Status extends Command {
|
|||
this.name = 'status';
|
||||
this.description = 'Prints out the status of a SystemD service that you run.';
|
||||
this.usage = `${this.client.config.prefix}systemd status <service name.`;
|
||||
this.enabled = true;
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
public async run(message: Message, args: string[]) {
|
||||
|
|
|
@ -7,7 +7,7 @@ export default class SystemD_Stop extends Command {
|
|||
this.name = 'stop';
|
||||
this.description = 'Stops a SystemD user service.';
|
||||
this.usage = `${this.client.config.prefix}systemd stop <service name>`;
|
||||
this.enabled = true;
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
public async run(message: Message, args: string[]) {
|
||||
|
|
|
@ -65,6 +65,12 @@ export default class CSCLI {
|
|||
socket.write(`${sshLogins}\n`);
|
||||
socket.destroy();
|
||||
break;
|
||||
case 'ramlimit':
|
||||
const account = await this.client.db.Account.findOne({ username: parsed.Username }).lean().exec();
|
||||
const tier = await this.client.db.Tier.findOne({ 'resourceLimits.ram': account.tier }).lean().exec();
|
||||
socket.write(`${tier.resourceLimits.ram}`);
|
||||
socket.destroy();
|
||||
break;
|
||||
default:
|
||||
socket.destroy();
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue