Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Feb 1998 01:36:47 +0000
From:      Brian Somers <brian@Awfulhak.org>
To:        Kwoody <kwoody@citytel.net>
Cc:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: small script question.. 
Message-ID:  <199802040136.BAA21583@awfulhak.org>
In-Reply-To: Your message of "Tue, 03 Feb 1998 12:11:09 PST." <Pine.BSF.3.91.980203115727.26041A-100000@mybsd.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I wrote this little thing:
> 
> #!/bin/sh
> ps ax | grep -v grep | grep -q city  
> if ( test $? -eq 0 ) 
>   then
>     echo "found"
> else 
>    echo "not found"
>    echo "running ppp..."
>    ppp -auto -alias city
> fi
[.....]

or:

#! /bin/sh
killall -0 ppp || ppp -auto -alias city

> thanks,
> Keith
> 

-- 
Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org>
      <http://www.Awfulhak.org>;
Don't _EVER_ lose your sense of humour....





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802040136.BAA21583>