How to update your server automatically every (x) mins with the unknown clan server ban list.
Right, this took me awhile to figure out, and it will only work on linux although a similar think could be done with windows based servers but it probly wouldn’t be as nice n easy.
This probably isn’t the best or most effective way knowing me of updating a file like this but here goes
First off I did this on FreeBSD so you may have some differences which you will have to look up because I don’t know.
Anyways.
This is designed to make your system updated a file called banned_users.cfg every X mins. To do this do the following:
We are going to make banupdate.sh
Copy this code into a file and name the file banupdate.sh with your favourite text editor.
1 – change the first line to reflect where your sourceforts CFG directory is
2 – You MAY need to change the third line to point at your wget file.
Now you need to put this file in your sourceforts CFG directory (make sure its named banupdate.sh and make sure all the directories are correct)
Now go to the sourceforts cfg directory and type type
Now to test this script is working type
and you should end up with a nice banned_user.cfg file in your CFG directory. Up to date with the latest bans from -=?=-
If everything has worked to this point the rest should be no problem. This bit makes the whole process which you did above automatic.
type ‘crontab –e’, this will bring up VI text editor. You now need to press esc then i and copy this code (right click on putty)
Quote:
|
*/30 * * * * /home/admin/srcds/sourceforts/cfg/banupdate.sh
|
Right, you need to change the directory to the point at your sourceforts CFG directory. The 30 means it will update every 30 mins. You cant increase this over 59. if you want to go over that then ask in the thread below or google crontab for linux :P
Then type :wq (this saves the file) it should tell you your cron job is installed (or something along those lines, if not then…. EEEP)
Now I recommend deleting any banned_user.cfg file you may have in the CFG directory and just wait until your cron script activates. It will mail you when it has done with its results, (type mail in shell to see your mail)
It should work =)
you MUST also add exec banned_user.cfg to your server.cfg or autoexec.cfg or this will all be pointless!
Thank you very much.
(sorry if this isnt very clear of is of no use to anyone but i thought i would write it up anyway

)