Raised This Month: $51 Target: $400
 12% 

Auto restart cmd not working correctly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 02-02-2013 , 20:34   Auto restart cmd not working correctly
Reply With Quote #1

I just got a new awesome rack server where I wanted to set up all my game servers on. Before I did not have auto restart and I have never dealt with it before.

I found a few people on this forum posting a batch file, so I combined it with others I found using google and I came up with this:

Code:
@echo off
:start
echo Starting SH + CTF server...
start /wait /affinity 1 hlds.exe -console -game cstrike -port 27017 +maxplayers 32
echo SH + CTF server crashed, restarting...
goto start
If I close the server console without closing this script it should just start it up once again, right?

That is what I have been doing, but whenever I close the server console it just prints this:
^GTerminate batch job (Y/N)?

And then it waits for a user input, if yes then the batch closes, if no then it restarts the server.

OS is Windows server 2008 R2 enterprise.

Searching google for a way to disable the message didn't teach me much about this, only one mentioning that this is can't be disabled since its just the way batch files work, but I have seen other people on this forum having success with this thing, so it must be possible.
__________________
No idea what to write here...

Last edited by Jelle; 02-02-2013 at 20:35.
Jelle is offline
Send a message via MSN to Jelle
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 02-02-2013 , 23:25   Re: Auto restart cmd not working correctly
Reply With Quote #2

Your server is in Windows OS so try to use HLSM by Rulzy.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 02-03-2013 , 17:03   Re: Auto restart cmd not working correctly
Reply With Quote #3

Works like a sharm thanks a lot!
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Reply



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 06:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode