Author Topic: Correct /etc/init.d/tremulous-server for debian  (Read 3053 times)

Salokine

  • Posts: 8
  • Turrets: +0/-0
    • http://salokine.hd.free.fr
Correct /etc/init.d/tremulous-server for debian
« on: August 21, 2006, 08:15:13 pm »
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():

Code: [Select]

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

Code: [Select]

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

  • Guest
Correct /etc/init.d/tremulous-server for debian
« Reply #1 on: August 22, 2006, 12:17:49 am »
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

  • Posts: 2737
  • Turrets: +291/-295
Correct /etc/init.d/tremulous-server for debian
« Reply #2 on: August 24, 2006, 11:34:53 pm »
Quote from: "Caveman"
I 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#msg169333
Ok 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

  • Guest
Correct /etc/init.d/tremulous-server for debian
« Reply #3 on: August 25, 2006, 03:11:40 am »
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

  • Posts: 2737
  • Turrets: +291/-295
Correct /etc/init.d/tremulous-server for debian
« Reply #4 on: August 25, 2006, 03:51:29 am »
Quote from: "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.
i don't see how the tremulous server differs from any other daemon
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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| #
|.@.-##
-----