SRCDS Steam group


starting srcds from wwwrun
#1
I want to start a shellscript from the user wwwrun. The Script start a CSS Server from user srcds but it doesn't start :/

Here is the command in the shellscript:

Code:
su $CS_USER -l -c "screen -d -m -S $NAME $DAEMON $PARAMS"
$CS_USER is srcds.

Is it because the user srcds is password protected? Please help me.
Reply
#2
Is there nobody who can help me?
Reply
#3
You can use sudo for it

First make a script where you put in the screen-command you wanna run.

Start visudo to edit /etc/sudoers. visudo is just a vi-wrapper to edit /etc/sudoers safely. Now add the following line:
wwwuser localhost=(srcds) NOPASSWD:PATH_TO_SCRIPT
where PATH_TO_SCRIPT is the full path to the script you created.
If you wanna know more read the manpage of sudoers

Now you change the su-line in your script in:
sudo -H -u $CS_USER SCRIPTNAME

That should do it
Note for our MickeySoft users:
A reboot a day, keeps Dr.Watson away Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)