Game server admin's helping the community setup and maintain great dedicated game servers.
----Home----Submit News ----Forum--------Guides----


Go Back   FPSadmin.com > BattleField > BattleField 2 > BF2 : General Server Support

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2005, 09:33 PM
lsf lsf is offline
Oldschool
 
Join Date: Jun 2005
Location: Norway
Posts: 20
Rep Power: 0
lsf is on a distinguished road
Lightbulb Server startup script and watchdog for win32 servers

Code:
@echo off
cls
echo Protecting BF2-server from crashes...
echo If you want to close BF2 and this script, close the BF2 window and type Y depending on your language followed by Enter.
title bf2_w32ded.exe Watchdog
:bf2start
echo (%time% at %date%) BF2-server started.
start /wait "bf2_w32ded.exe Watchdog" "C:\Program Files\EA Games\Battlefield 2 Server\bf2_w32ded.exe" +config "C:\Documents and Settings\Administrator\My Documents\Battlefield 2\ServerConfigs\dg.con" +mapList "C:\Documents and Settings\Administrator\My Documents\Battlefield 2\ServerConfigs\_maplist.con"
echo (%time% at %date%) WARNING: BF2 closed or crashed, restarting.
goto bf2start
create a empty bf2start.bat text file. Paste the above code into it, and you have yourself a nice watchdog that will restart the server if it crashes and it will launch the game without the use of the launcher program.

Hope you all find this info usefull

PS: You need to edit the file to match your path(s) and config-file-name(s).
The "bf2_w32ded.exe Watchdog" is just the name of the window (for some reason the start command in windows needs this rather then the title parameter in order to start a program that has "program path\name.exe" while if you have just name.exe it does not need them, stupid but it's M$ so ....
Also, if you need or would like your server to run a different priority modify the line
start /wait "bf2_w32ded.exe Watchdog" "C:\Program........ to read start /wait /abovenormal "bf2_w32ded.exe Watchdog" "C:\Program ........ or any other priority you might find usefull. (be carefull with running aplications above normal as it might result in crashes or freezes or worse)

-lsf

edit: modified (%time%) to also include date so you will know the date as well as time.

Last edited by lsf; 06-25-2005 at 11:07 AM.
Reply With Quote
  #2  
Old 06-25-2005, 12:25 AM
rudedog's Avatar
rudedog rudedog is offline
Site Owner
 
Join Date: Oct 2002
Location: Florida, USA
Age: 49
Posts: 9,971
Rep Power: 31
rudedog is a splendid one to beholdrudedog is a splendid one to beholdrudedog is a splendid one to beholdrudedog is a splendid one to beholdrudedog is a splendid one to beholdrudedog is a splendid one to behold
Send a message via Skype™ to rudedog
Thanks lsf, post stickied
__________________
Not so Rude -RudeDog via Twitter or Friend feed

Microsoft MVP 2009-2016 Games for Windows
Reply With Quote
Reply

Bookmarks

Thread Tools
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

Forum Jump


All times are GMT -4. The time now is 09:01 PM.


Powered by: vBulletin Copyright ©2000, Jelsoft Enterprises Ltd.