[bf1942] does anyone have an working startscript?

kenk at shreve.net kenk at shreve.net
Sun Feb 16 17:36:38 EST 2003


> I like to run this as a non root user so I create a
> bf1942 account and use this in Joe's script
>
>   su --login --command=$path/$game bf1942 >&/dev/null&

This is kind of an old post, I've been saving it for when I need it. 
Well, now I need it. I am using the chkconfig startup script someone
posted on here not to long ago. It works and all that, but I dont want it
to run as root, I want it to run under my 'games' user account.  I can do
this manually from the shell, but when I try to work that into the startup
script it never works.

Can someone share how they have their start-up script setting the user to
some non-root account before starting?

Here's my current non-working code snippet:

 case "$1" in
   start)
         echo -n "Starting $game in $path: "
         cd $path
         su -l games -c '$path/bf_start.sh &'
         sleep 2
         echo
         ;;

I dont see anyway to run it as root (besides its just a bad idea) since it
constantly clobbers the server settings file (Ryan, in the name of all
that is holy please fix this!).

Again, sorry for this OT nonsense, but I know its going to come up. Might
as well get it in the archives now.






More information about the Bf1942 mailing list