title: Run file for game server
body: <p>Alright, so I have a .sh file that I run that will launch my server with the certain specifics that I'm looking for. It launches the server through screen into it's own screen. Here's the code for my run.sh file.</p>
  
  <pre><code>#!/bin/bash
  # run.sh
  # conversion of run.bat to shell script.
  
  echo "Protecting srcds from random crashes"
  echo "Now launching Garrys Mod RequiemRP"
  
  sleep 5
  screen -A -m -d -S gmserver ./srcds_run -console -game garrysmod +maxplayers 32 +map rp_downtown_v6 -autoupdate
  echo "Server initialized. Type screen -x to resume"
  </code></pre>
  
  <p>Usually I use a batch file to do this, but I'm now using linux for my server hosting. Part of that batch file was if srcds (the server itself) were to crash, the run.bat file would restart the server automatically. I'm looking to do this with my run.sh file, but I'm unsure how to.</p>