From owner-freebsd-questions Sat Jul 3 18:53:25 1999 Delivered-To: freebsd-questions@freebsd.org Received: from awfulhak.org (dynamic-107.max1-du-ws.dialnetwork.pavilion.co.uk [212.74.8.107]) by hub.freebsd.org (Postfix) with ESMTP id 61B1414D0C for ; Sat, 3 Jul 1999 18:53:21 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from dev.lan.awfulhak.org (dev.lan.awfulhak.org [172.16.0.5]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id AAA01632; Sun, 4 Jul 1999 00:30:40 +0100 (BST) (envelope-from brian@lan.awfulhak.org) Received: from dev.lan.awfulhak.org (localhost [127.0.0.1]) by dev.lan.awfulhak.org (8.9.3/8.9.3) with ESMTP id AAA73298; Sun, 4 Jul 1999 00:30:39 +0100 (BST) (envelope-from brian@dev.lan.awfulhak.org) Message-Id: <199907032330.AAA73298@dev.lan.awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: Brandon Fosdick Cc: questions@FreeBSD.ORG Subject: Re: Script to make ppp hangup? In-reply-to: Your message of "Fri, 02 Jul 1999 12:24:41 EDT." <377CE7C9.3E6CC193@glue.umd.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 04 Jul 1999 00:30:39 +0100 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I want to make a script that runs 'ppp -background' then fetchmail and then > tells ppp to hangup. Currently the only way I know how to make a background ppp > process disconnect is by using kill, but ppp doesn't leave its pid anywhere > (that I can find) so I don't know how the script will know what process to kill. > Is there another way to do this? If it's the only running ppp on your machine, a simple ``killall ppp'' is the easiest way. Alternatively, put something like ! sh -c "echo PROCESSID >/tmp/ppp.pid" in ppp.linkup and do a ``kill `cat /tmp/ppp.pid`'' from your script, or if you've got a ``set server'' in your config, just use pppctl to tell ppp to ``close''. > Thanks, > Brandon > -- > bfoz@glue.umd.edu > "Lead, follow, or get run over" > "In life there are those who steer, and those who push" > "I'm not impatient, the world is too slow" > "Life is short, so have fun, play hard, and leave a good looking corpse" -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message