-1

I have made a shell script to run a server for a game I like. I need the server to run when I close putty. Right now putty is the console, but I need it to not close when I close the program down.

startServer.sh: ~/server_1/srcds_run -game garrysmod +maxplayers 32 +map gm_bigcity I need it to run everything in there daemonized.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232

1 Answers1

0

try this :

nohup $HOME/server_1/srcds_run -game garrysmod +maxplayers 32 +map gm_bigcity & > logfile 2>&1

logfile is if you want to keep track of what is coming to the screen. if you don't care, replace it with /dev/null

man nohup for further info

MelBurslan
  • 6,966