var/bans.txt symbolic link ?
var/bans.txt symbolic link ?
im currently running 12 servers and was wondering if its possible to use a symbolic link from all servers to a single bans.txt file so that if i ban someone in 1 server they will be banned in all servers ?
will it cause issues ? I dont want to break something !
thanks
will it cause issues ? I dont want to break something !
thanks
Re: var/bans.txt symbolic link ?
Well, the servers don't use any kind of file locking when writing to files. So if they're shared, two servers may write to it simultaneously, which can't be good. Also, they definitely will only read information from that file on every restart, so bans will take a while to travel from one server to the other.
The other thing that might happen is that the servers will simply destroy the link and replace it with a plain file. Depends on the details of the write, which I don't have in my head right now. If you're not worried about losing data for the reason above, you just have to try.
The other thing that might happen is that the servers will simply destroy the link and replace it with a plain file. Depends on the details of the write, which I don't have in my head right now. If you're not worried about losing data for the reason above, you just have to try.
Re: var/bans.txt symbolic link ?
z-man thanks
i didnt consider the servers only read the file during startup so instant ban across all servers isnt going to work
i'll try something scripted that sends the ban command to all servers
thanks dude
i didnt consider the servers only read the file during startup so instant ban across all servers isnt going to work
i'll try something scripted that sends the ban command to all servers
thanks dude
- delinquent
- Match Winner
- Posts: 761
- Joined: Sat Jul 07, 2012 3:07 am
Re: var/bans.txt symbolic link ?
I think a better option might be to write a service that checks the collection of banfiles across all servers, and writes any differences to the other files based on the file that was most recently modified. That would cover players being both banned and unbanned.
Re: var/bans.txt symbolic link ?
thanks thats a good idea but still the other servers will not be update until they restart and reload their ban filesdelinquent wrote: ↑Tue Aug 04, 2020 2:48 am I think a better option might be to write a service that checks the collection of banfiles across all servers, and writes any differences to the other files based on the file that was most recently modified. That would cover players being both banned and unbanned.
i think sending the ban and unban commands into all servers would give the instant ban/unban im looking for
- delinquent
- Match Winner
- Posts: 761
- Joined: Sat Jul 07, 2012 3:07 am
Re: var/bans.txt symbolic link ?
You could still use that service, then. Check for recent modifications, and then echo the command to each running server.
Re: var/bans.txt symbolic link ?
i'll look into this, thanksdelinquent wrote: ↑Tue Aug 04, 2020 6:26 pm You could still use that service, then. Check for recent modifications, and then echo the command to each running server.
Re: var/bans.txt symbolic link ?
i had a go at parsing the file to check for updates but i wasnt getting far with the code so I went with scripting something
my servers have a script that already parses ladderlog data for various stuff like displaying the top players and such
so I used the INVALID_COMMAND trigger when you enter /somecommand that doesnt exist
added two commands for global ban and global unban
/gb ipaddress time message
/gu ipaddress
these send BAN_IP/UNBAN_IP commands with arguments to the 14 servers, tested and it works great
my servers have a script that already parses ladderlog data for various stuff like displaying the top players and such
so I used the INVALID_COMMAND trigger when you enter /somecommand that doesnt exist
added two commands for global ban and global unban
/gb ipaddress time message
/gu ipaddress
these send BAN_IP/UNBAN_IP commands with arguments to the 14 servers, tested and it works great
Last edited by Galaxip on Fri Aug 14, 2020 3:51 pm, edited 1 time in total.
- delinquent
- Match Winner
- Posts: 761
- Joined: Sat Jul 07, 2012 3:07 am
Re: var/bans.txt symbolic link ?
Could you upload it to the resource manager? I have a feeling other server admins will find this incredibly useful. Nice work
Re: var/bans.txt symbolic link ?
thanks to nelg for pointing out that I could intercept the ADMIN_COMMAND on ladderlog so now i have a new improved version
ive removed the two new commands and just intercept the original /admin ban_ip and /admin unban_ip events in ladderlog which is much nicer
erm wheres the resource manager XD
ive removed the two new commands and just intercept the original /admin ban_ip and /admin unban_ip events in ladderlog which is much nicer
sure its written in bash XD i hope thats okCould you upload it to the resource manager? I have a feeling other server admins will find this incredibly useful. Nice work
erm wheres the resource manager XD
- delinquent
- Match Winner
- Posts: 761
- Joined: Sat Jul 07, 2012 3:07 am
Re: var/bans.txt symbolic link ?
http://resource.armagetronad.net/resource/
click at the top left and login with your forums link. The uploader will automatically create any file paths not already in existence from the path you specify, and the resource will be available at
click
Code: Select all
upload to resource
Code: Select all
resource/galaxip/<path>
Re: var/bans.txt symbolic link ?
i'll strip it down the the bare minimum needed because its currently full of other stuff like displaying top players at and of match and other things and submit it shortly
thanks
thanks
Re: var/bans.txt symbolic link ?
You're uploading a script to the main map resource? Is that even possible?
Re: var/bans.txt symbolic link ?
that resource link isnt https I dont really want to login there so i'll post it as a zip here
- Attachments
-
- mcp.zip
- (854 Bytes) Downloaded 186 times
Re: var/bans.txt symbolic link ?
probably not, i never got to try XD