SRCDS Steam group

Need Help for Linux srcds start script
hello i try to start linux server with certain user like that :

st_user="MY USER"
chown $st_user -R /home/MY USER/srcds/cstrike/addons/sourcemod/logs/
cd /home/MY USER/srcds/
su - $st_user screen -A -m -d -S test ./srcds_run -game cstrike -console +maxplayers 32 +port 27023 +ip -tickrate 66 +map de_dust2

but the server starts with root ... can someone help me to fix it
sudo -u $st_user screen ... (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
I guess it should be:
su $st_user -c screen bla bla bla

Anyway why run as root/su and switch back to a different User? Are you planning to implement it in the init.d? If not remove the su and st_user part, login with the desired user and execute your startscript with the desired user.
i tried what you said and it did not work ... server starts with root all the time

last i tried with :

chown -R user:user /home/user/copysrcds/cstrike/addons/sourcemod/logs/
su user
cd /home/user/backup/copysrcds/
screen -A -m -d -S test ./srcds_run -game cstrike -console +maxplayers 32 +port 27023 +ip -tickrate 66 +map de_dust2

and still starts with root Sad

what is wrong
for mine I have

su -c "/startscripts/" - username
su -c "/startscripts/" - username2

in my init.d folder to call scripts that have something along the lines of below:


screen -AmdS 1-username ./srcds_run -game cstrike -ip -port 27015 -maxplayers 11 -tickrate 100 +fps_max 0 +map de_dust2 +servercfgfile server.cfg +tv_enable 1 +tv_maxclients 5 +tv_port 27020 -autoupdate

It seems to work fine for me.

Forum Jump:

Users browsing this thread: 1 Guest(s)