Author Topic: Tremulous server as daemon  (Read 2698 times)

Salokine

  • Posts: 8
  • Turrets: +0/-0
    • http://salokine.hd.free.fr
Tremulous server as daemon
« on: August 25, 2006, 08:51:08 pm »
Hi,

I'm OK with kevlarman, but it's not the subjet to know if daemon method is better than screen.

Standard way (on Debian) is to manage services (server applications) using /etc/init.d/* scripts. The daemon script provide by current package is wrong. I want give my contribution to improve Tremulous.

This my explanation of my correction:

Current script do:

tremulous_start() {

     //If game is running, return value "2"
     if [ -f $PIDFILE ]; then
         return 2
     fi
    //But script continu to execute the starting process
     start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
        --background --exec $DAEMON --make-pidfile --chuid nobody \
        -- $DAEMON_OPTS &> /dev/null || return 1
 
  return 0
 }

My correction:

tremulous_start() {
     //If ... the same thing
     if [ -f $PIDFILE ]; then
         return 2 //Tremulous is already running
     else
     //Else Tremulous server isnot running, so lunch the daemon
     start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
         --background --exec $DAEMON --make-pidfile --chuid nobody \
         -- $DAEMON_OPTS &> /dev/null || return 1 //If starting daemon failed, return 1
     fi
 
  return 0 //If Tremulous start successful, return value "0"
 }

Sorry for my poor english language, but i'm french .... ;-).
I hope I can debian package manager of tremulous.

Bye.
Salokine

PS: I do a copy of this message with the repotbug program to
http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=tremulous