rotatelogs.c
ds3.0/lib/secure/cmds/admins/rotatelogs.c · 347 B
From the archive ds3.0.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;
}
string GetHelp(){
return ("Syntax: rotatelogs\n\n"
"Archives old logs if they are too large.");
}