cloudservices/src/cscli/handlers/killpid.ts

14 lines
300 B
TypeScript

import { TCPHandler, Context } from '..';
export default class KillPID extends TCPHandler {
constructor() {
super();
this.endpoint = 'killpid';
}
public async handle(ctx: Context) {
await ctx.client.util.exec(`kill -9 ${ctx.data.message}`);
return ctx.socket.destroy();
}
}