News:

Come Chat with us live! Learn how HERE!

Main Menu

Correct /etc/init.d/tremulous-server for debian

Started by Salokine, August 21, 2006, 08:15:13 PM

Salokine

Hi,

This a correction of /etc/init.d/tremulous-server
It's for the package 1.1.0-2 (on Debian/Testing for me)

Bad version of function tremulous_start():


tremulous_start() {
   if [ -f $PIDFILE ]; then
       return 2
   fi
   start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
      --background --exec $DAEMON --make-pidfile --chuid nobody \
      -- $DAEMON_OPTS &> /dev/null || return 1

return 0
}


Good version


tremulous_start() {
   if [ -f $PIDFILE ]; then
       return 2
   else
   start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
       --background --exec $DAEMON --make-pidfile --chuid nobody \
       -- $DAEMON_OPTS &> /dev/null || return 1
   fi

return 0
}


Bye.
Salokine

Caveman

I don't know under which circumstances one would even think about starting any game via init.d.
The correct way to do that would be via 'screen' so the process can be better controlled.

As for this redundant 'else' statement, what exactly was your problem?
Posting this w/o any explanation might lead newbies in the wrong direction and produce more questions than necessary.

kevlarman

Quote from: CavemanI don't know under which circumstances one would even think about starting any game via init.d.
if tremulous is on a remote server...
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

Caveman

That is exactly why one would use 'screen' instead of init.d.
With screen the process can be separated and attached to a login as needed.
Init.d should only be used to start demons not services or games.

kevlarman

Quote from: CavemanThat is exactly why one would use 'screen' instead of init.d.
With screen the process can be separated and attached to a login as needed.
Init.d should only be used to start demons not services or games.
i don't see how the tremulous server differs from any other daemon
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----