AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   Plugin that automaatically delete old logs? (https://forums.alliedmods.net/showthread.php?t=289303)

fragnichtnach 10-19-2016 16:23

Plugin that automaatically delete old logs?
 
Does anybody knows a plugin that automaatically delete old logs? I am talking about sourcemod-logs and the normal csgo-logs.

Thanks for any help.

Husker 10-19-2016 16:34

Re: Plugin that automaatically delete old logs?
 
No need for such a plugin, just make a script that deletes old log files (theres plenty of examples of such scripts in the interwebz).

headline 10-19-2016 19:55

Re: Plugin that automaatically delete old logs?
 
1 Attachment(s)
This is more of a plugin request so it should be moved there, but this should work :D


It automatically deletes files that are older than a week. If you want to increment the time change this line. It's in weeks
Code:

#define WEEKS_TO_DELETE 1
As usual, SourceMod 1.7+
Spoiler

Puppetmaster 10-19-2016 22:49

Re: Plugin that automaatically delete old logs?
 
I usually just add this to my crontab:

Code:

0 5 * * * /usr/bin/find / -name errors*.log -exec rm {} + && /usr/bin/find / -name L20*.log -exec rm {} +


All times are GMT -4. The time now is 05:37.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.