hard linking banfile for multi-server bans?

Need help seting up a server, or have a question on how to run one? This is the place.
Post Reply
musculargenius
Private First Class
Private First Class
Posts: 24
Joined: Sun Jul 01, 2018 12:17 am
Location: Dallas, TX

hard linking banfile for multi-server bans?

Post by musculargenius »

Could I create a single banfile and just hard link to it in other directories so that other bzfs servers see the same changes (because the hardlinks are pointing back to the original)? Or can you just use the same banfile for all servers without locking issues or race conditions? Thanks...
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: hard linking banfile for multi-server bans?

Post by blast »

You don't even need to hard link. You can use symlinks to a shared file. I believe when you ban/unban someone it reloads the banlist from disk prior to that. Additionally, the serverControl plugin can be used to automatically reload the ban file when the file changes, so a ban on one server will quickly show up on all servers.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
musculargenius
Private First Class
Private First Class
Posts: 24
Joined: Sun Jul 01, 2018 12:17 am
Location: Dallas, TX

Re: hard linking banfile for multi-server bans?

Post by musculargenius »

Similar question: does reportfile get accessed using flock() ?? Safe IO or risk of truncate on race condition if two servers share the file and a /report is made simultaneously?
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: hard linking banfile for multi-server bans?

Post by blast »

I'd keep report files separate so you know which server a report was filed on.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
Post Reply