Skip to content

Instantly share code, notes, and snippets.

@belst
Created February 9, 2018 10:44
Show Gist options
  • Save belst/86e65b6dca3f2a196179bd91d7824340 to your computer and use it in GitHub Desktop.
Save belst/86e65b6dca3f2a196179bd91d7824340 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
SERVERNAME="${SERVERNAME:-B44Server1}";
SERVERHOME="${SERVERHOME:-/home/bt44/LinuxServer}";
STARTSCRIPT="${STARTSCRIPT:-Run.sh}";
screen -dmS "$SERVERNAME" bash -c "cd $SERVERHOME; until ./$STARTSCRIPT; do echo 'Server crashed. Restarting...'; done;";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment