SRCDS Steam group


Linux init script to start server on boot
#21
scriptfu Wrote:Hi everyone,

It's always a good idea to run any service as a user instead of root, so I'll be modifying this script to run as a user. Would it be beneficial to anyone if I wrote a tutorial on setting up a chrooted SRCDS environment? I have seen many tutorials on setting up SRCDS, but none yet on setting up SRCDS in a secure manner.

Cheers,
Dan

A small change in the above script could be this:

Code:
USER_NAME="tf2"
CURRENT_USER=$(/usr/bin/whoami)

and for starting the app:
Code:
if [ "$CURRENT_USER" = "$USER_NAME" ]; then
    sh -c "$INTERFACE $STEAM/$DAEMON $OPTS"
  else
    su - $USER_NAME -c "$INTERFACE $STEAM/$DAEMON $OPTS"
  fi

A chrooted environment setup would be interesting to see.
Reply


Messages In This Thread
RE: Linux init script to start server on boot - ogre_x - 09-11-2008, 06:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)