Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Feb 1998 11:14:27 -0800 (PST)
From:      Kwoody <kwoody@citytel.net>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: small script question.. 
Message-ID:  <Pine.BSF.3.91.980204105901.26597C-100000@mybsd.net>
In-Reply-To: <199802040136.BAA21583@awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Wed, 4 Feb 1998, Brian Somers wrote:

> >    echo "not found"
> >    echo "running ppp..."
> >    ppp -auto -alias city
> > fi
> [.....]
> 
> or:
> 
> #! /bin/sh
> killall -0 ppp || ppp -auto -alias city
> 

I dont want to kill it if its already running. I just want to check if 
ppp is running if not then run it.

Though I think I see what it does. It kills ppp and any other process's 
it spawned. If ppp was not running at the time, killall would fail
and then run the next statement.

But what if ppp is running? Killall would kill ppp then (now I'm guessing 
here) since it killed it it says done killed, but then ppp will not be 
running cause killall was successful so the next statement does not get 
executed.

Or am I way off base here?
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.980204105901.26597C-100000>