Good Linux question — answering as the UphillTech team:
As stated in SYNOPSIS of man screen if you want to run a command in screen it needs to be appended to the command issuing screen. So in your case it would look like #!/bin/sh screen -S tf2 ./startserver.sh Yet as I do not know if your shell-script is in the working directory of screen, It is more clever to do this #!/bin/sh screen -S tf2 /full/path/to/startserver.sh
Full answer by d1bro: https://askubuntu.com/a/854744 (CC BY-SA 3.0).
Need Linux help for your business? UphillTech.