Banner

Repeat

End

Forums

HavenForts: Construct JetFists - The Chronicles of Wargasm (Episode 2, NeoForts)

Go Back   SourceForts > SourceForts > Server Admin Discussion
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-03-2005
Experienced Builder
 
Join Date: Jun 2005
Location: UK
Posts: 335
Send a message via MSN to iamacup
Default How to auto update from the -=?=- ban list

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.

Quote:
cd /home/admin/srcds/sourceforts/cfg/
rm ./banned_user.cfg
/usr/local/bin/wget http://www.the-unknown.org/bans/banned_user.php
mv ./banned_user.php ./banned_user.cfg
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

Quote:
chmod +x banupdate.sh
Now to test this script is working type
Quote:
./banupdate.sh
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 )
__________________
http://www.unknown-files.net/ - http://www.thebestforumintheworld.com/
Quote:
It just seems important to make a solid well aligned fort instead of some art deco floating turd of a base.
Reply With Quote
  #2  
Old 10-03-2005
Experienced Builder
 
Join Date: Jun 2005
Location: UK
Posts: 335
Send a message via MSN to iamacup
Default How to auto update from the -=?=- ban list

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.

Quote:
cd /home/admin/srcds/sourceforts/cfg/
rm ./banned_user.cfg
/usr/local/bin/wget http://www.the-unknown.org/bans/banned_user.php
mv ./banned_user.php ./banned_user.cfg
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

Quote:
chmod +x banupdate.sh
Now to test this script is working type
Quote:
./banupdate.sh
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 )
__________________
http://www.unknown-files.net/ - http://www.thebestforumintheworld.com/
Quote:
It just seems important to make a solid well aligned fort instead of some art deco floating turd of a base.
Reply With Quote
  #3  
Old 10-04-2005
Experienced Builder
 
Join Date: Aug 2005
Posts: 362
Default

Hope you realize that srcds doesn't clear the ban list on mapchange, only on server restart.. so if you unban somone it won't get to all the servers until they get restarted.
Reply With Quote
  #4  
Old 10-04-2005
Experienced Builder
 
Join Date: Aug 2005
Posts: 362
Default

Hope you realize that srcds doesn't clear the ban list on mapchange, only on server restart.. so if you unban somone it won't get to all the servers until they get restarted.
Reply With Quote
  #5  
Old 10-04-2005
FuzionMonkey
Guest
 
Posts: n/a
Default

well, the servers crash often enough. lol.
Reply With Quote
  #6  
Old 10-04-2005
FuzionMonkey
Guest
 
Posts: n/a
Default

well, the servers crash often enough. lol.
Reply With Quote
  #7  
Old 10-04-2005
Klient
Guest
 
Posts: n/a
Default

It's annoying the ban list being cleared on server restart.... Anyone got a sourceMM that runs off it's own banlist??? :P
Reply With Quote
  #8  
Old 10-04-2005
Klient
Guest
 
Posts: n/a
Default

It's annoying the ban list being cleared on server restart.... Anyone got a sourceMM that runs off it's own banlist??? :P
Reply With Quote
  #9  
Old 10-04-2005
Experienced Builder
 
Join Date: Jun 2005
Location: UK
Posts: 335
Send a message via MSN to iamacup
Default

Quote:
Originally Posted by devicenull
Hope you realize that srcds doesn't clear the ban list on mapchange, only on server restart.. so if you unban somone it won't get to all the servers until they get restarted.
even if someone does exec banned_user.cfg ???
__________________
http://www.unknown-files.net/ - http://www.thebestforumintheworld.com/
Quote:
It just seems important to make a solid well aligned fort instead of some art deco floating turd of a base.
Reply With Quote
  #10  
Old 10-04-2005
Experienced Builder
 
Join Date: Jun 2005
Location: UK
Posts: 335
Send a message via MSN to iamacup
Default

Quote:
Originally Posted by devicenull
Hope you realize that srcds doesn't clear the ban list on mapchange, only on server restart.. so if you unban somone it won't get to all the servers until they get restarted.
even if someone does exec banned_user.cfg ???
__________________
http://www.unknown-files.net/ - http://www.thebestforumintheworld.com/
Quote:
It just seems important to make a solid well aligned fort instead of some art deco floating turd of a base.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:09 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0

Tab