1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

mnc: implem first commands

This commit is contained in:
Steve Schnepp 2013-02-08 21:12:30 +01:00
parent 1d56b5845d
commit 773d5ed4cf

View file

@ -63,16 +63,26 @@ int main(int argc, char *argv[]) {
cmd = strtok(line, " \t\n");
arg = strtok(line, " \t\n");
if (strlen(cmd) == 0) continue;
if (strcmp(cmd, "version") == 0) {
if (strlen(cmd) == 0) {
} else if (strcmp(cmd, "version") == 0) {
printf("munin c node version: %s\n", VERSION);
} else if (strcmp(cmd, "nodes") == 0) {
printf("%s\n", host);
printf(".\n");
} else if (strcmp(cmd, "quit") == 0) {
return(0);
} else if (strcmp(cmd, "list") == 0) {
} else if (strcmp(cmd, "config") == 0) {
} else if (strcmp(cmd, "fetch") == 0) {
} else if (strcmp(cmd, "cap") == 0) {
printf("cap ");
if (strlen(spoolfetch_dir)) {
printf("spool ");
}
printf("\n");
} else if (strcmp(cmd, "spoolfetch") == 0) {
} else {
printf("# unknown cmd: %s\n", cmd);
}
}