Server autorestart?

I saw somewhere there was a lill code that when your dedi serv crashes it auto restarts? can anyone post it plx?

@echo off
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title Watchdog
echo (%time%) srcds started.
start /wait srcds.exe -console -game cstrike +map de_dust +maxplayers 8 -nocrashdialog
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds

Try that in a batch file.

Remember to substitute -game cstrike with -game garrysmod and the rest of the values to your liking. Leave the last one on or your in trouble.

You should use Fire Daemon. It creates an auto-restart service for it.

what?? batch file?

Put that in notepad. And save it as watchdog.bat

The quotes are important, otherwise it saves as watchdog.bat.txt

Download serverdoc.

Where do you put the bat file?

In the same directory as your srcds.exe