Merged
Conversation
Gamecount should target gamelogdir, not scriptlogdir, as it seems to be for retrocompatibility only, and according to this (line 44) :
if [ "${engine}" == "unreal2" ]||[ "${engine}" == "source" ]; then
find "${gamelogdir}"/ -type f -mtime +${logdays}|tee >> "${scriptlog}"
fi
Why make it simple when you can make it harder ! > Removing conditional functions for additions, by setting all variables to 0 before starting counting. > Removing "else, set to 0", as 0 is now the default state
Merging logging, counting, and removing logfiles in one place, to avoid some redundant if statements Also, understanding the code and supporting new logs should be easier. Adding srcds / sm / ulx / darkrp logs support
and removing useless check for creating folders variables
Contributor
Author
|
Confirm working with CSS, it took a while, lol... I never cleaned it before. [ OK ] Log Manager css-server: Starting I also saw a /log/server folder, as my installation was pretty old. I'll make a function to clean those too. |
Contributor
Author
|
Here it is, the old /log/server folder will be cleaned, and removed only if empty (means containling no log since ${logdays}. |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #354
Took me some time to figure out how it was working, and to simplify it a little bit (with the exact same functionalities), but i think it's way cleaner that way.
Tested, working on one of my DarkRP.
I see no reason why it wouldn't work for sourcemod, as the folder path is right, and i triple checked the syntax.