Tremulous Forum

General => Troubleshooting => Topic started by: Salokine on August 21, 2006, 08:15:13 pm

Title: Correct /etc/init.d/tremulous-server for debian
Post by: Salokine 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
Title: Correct /etc/init.d/tremulous-server for debian
Post by: Caveman 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.
Title: Correct /etc/init.d/tremulous-server for debian
Post by: kevlarman 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...
Title: Correct /etc/init.d/tremulous-server for debian
Post by: Caveman 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.
Title: Correct /etc/init.d/tremulous-server for debian
Post by: kevlarman 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