@porosys/ndtool
Version:
Netdata alert and automation tool
36 lines (32 loc) • 944 B
text/typescript
import { installCommand } from '../lib/commands/install/install.command';
import { configCommand } from '../lib/commands/config.command';
import { restartCommand } from '../lib/commands/restart.command';
import { addAlertCommand } from '../lib/commands/add-alert.command';
import { uninstallCommand } from '../lib/commands/uninstall.command';
async function main() {
const command = process.argv[2];
switch (command) {
case 'install':
await installCommand();
break;
case 'config':
await configCommand();
break;
case 'restart':
await restartCommand();
break;
case 'add-alert':
await addAlertCommand();
break;
case 'uninstall':
await uninstallCommand();
break;
default:
console.log('Usage: ndtool <command>');
console.log(
'Commands: install | uninstall | restart | config | add-alert',
);
}
}
void main();