[cod] log rotate script?

|PxR| TazAnimal tazanimal at rifleteam.com
Mon Jan 24 12:14:30 EST 2005


Luke:
  I know you already got another answer to this, but here is how I do it in
my start script...

        mv .callofduty/main/games_mp.log logs/Main_$(date
+%Y%m%d%H%M)games_mp.log
        mv .callofduty/pb/sv_viol.log logs/PBViol_Main_$(date
+%Y%m%d%H%M).log
        mv .callofduty/pb/sv_cheat.log logs/PBCheat_Main_$(date
+%Y%m%d%H%M).log
        cd .callofduty/pb/svlogs
        for i in $( ls *.log );
        do
            src=$i
            tgt=../../../logs/PBLog_Main_$(date +%Y%m%d%H%M)_$i
            mv $src $tgt
        done

Then, I have all my logs in a logs directory. :-)

Taz!

-----Original Message-----
From: Luke [mailto:luke at techfreak.org]
Sent: Monday, January 24, 2005 6:13 AM
To: cod at icculus.org
Subject: [cod] log rotate script?


Hey all,

Does anyone have a log rotate script I can use? What Im looking for
is a script that would archive the current server logs when I run my
server restart script. Possibly archive by date.....

I could make any adjustments needed if nobody has exactly that.

Thanks!


--
"Ok, I admit it. I was just a front-man for the real fathers of Linux,
the Tooth Fairy and Santa Claus."

--- Linus Torvalds




More information about the Cod mailing list