rotatelogs.c

ds2.10/lib/secure/cmds/admins/rotatelogs.c · 341 B

From the archive ds2.10.zip

Download the archive   « Back to the archive contents

#include <lib.h>
#include <daemons.h>

inherit LIB_DAEMON;

int cmd() {
    int ret = LOG_D->RotateLogs();
    if(ret){
        write("Logs rotated.");
    }
    else {
        write("Failed to rotate logs.");
    }
    return 1;
}

void help() {
    write("Syntax: rotatelogs\n\n");
    write("Archives old logs if they are too large.");
}

Site Stats

Snippets: 1791
Codebases: 571