🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #5987

Re: Script para lanzar daemon

#5987
From: Alvaro G. Vicario
Date: Thu, 21 Aug 2003 08:40
28 lines
1861 bytes
"Alvaro G. Vicario" <kAlvaro.NOSPAMTHANKS@terra.es> escribi� en el mensaje
news:Xns93DDD7EDD6A9BkAlvaro@130.133.1.4...
>     start() {
>            echo -n $"Starting $prog: "
>         cd /home/tpv/bin
>         daemon $tpv "-path_config $config"
>         RETVAL=$?
>         echo
>         [ $RETVAL = 0 ] && touch /var/lock/subsys/tpv
>         return $RETVAL
>     }

Ya encontr� la soluci�n, evidentemente no todos los daemons son programas
que se lanzan autom�ticamente en segundo plano as� que no ten�a m�s que
curiosear en el directorio init.d...

start() {
        cd /home/tpv/bin
        $tpv -path_config $config &
        RETVAL=$?
        if [ $RETVAL -eq 0 ]; then
            action $"Starting $prog: " /bin/true
        else
            action $"Starting $prog: " /bin/false
        fi
        [ $RETVAL = 0 ] && touch /var/lock/subsys/tpv
        return $RETVAL
}
Technical Details
Message-ID: <bi20i4$4ck0a$1@ID-157797.news.uni-berlin.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!fu-berlin.de!uni-berlin.de!10.red-80-37-15.pooles.rima-tde.NET!not-for-mail
References: <Xns93DDD7EDD6A9BkAlvaro@130.133.1.4>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,5b4755d0fa935e51
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-08-21 01:40:40 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!fu-berlin.de!uni-berlin.de!10.red-80-37-15.pooles.rima-tde.NET!not-for-mail
From: "Alvaro G. Vicario" <alvaro.QUITAR_REMOVE@telecomputeronline.com>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Script para lanzar daemon
Date: Thu, 21 Aug 2003 10:40:34 +0200
Lines: 30
Message-ID: <bi20i4$4ck0a$1@ID-157797.news.uni-berlin.de>
References: <Xns93DDD7EDD6A9BkAlvaro@130.133.1.4>
NNTP-Posting-Host: 10.red-80-37-15.pooles.rima-tde.net (80.37.15.10)
X-Trace: news.uni-berlin.de 1061455237 4608010 80.37.15.10 (16 [157797])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165