From owner-freebsd-questions Wed Feb 4 12:15:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA28547 for questions-outgoing; Wed, 4 Feb 1998 12:15:00 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from citytel1.citytel.net (root@citytel1.citytel.net [204.244.99.66]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA28531 for ; Wed, 4 Feb 1998 12:14:49 -0800 (PST) (envelope-from kwoody@citytel.net) Received: from citytel.net (citytelprct59.citytel.net [204.244.99.12]) by citytel1.citytel.net (8.8.8/8.8.5) with ESMTP id MAA03274; Wed, 4 Feb 1998 12:14:00 -0800 (PST) Received: from mybsd.net (mybsd.net [192.168.0.2]) by citytel.net (8.8.5/8.8.5) with SMTP id LAA26639; Wed, 4 Feb 1998 11:14:27 -0800 (PST) Date: Wed, 4 Feb 1998 11:14:27 -0800 (PST) From: Kwoody X-Sender: kwoody@mybsd.net To: Brian Somers cc: freebsd-questions Subject: Re: small script question.. In-Reply-To: <199802040136.BAA21583@awfulhak.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe questions" 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?