Date: Sun, 04 Jul 1999 00:30:39 +0100 From: Brian Somers <brian@Awfulhak.org> To: Brandon Fosdick <bfoz@glue.umd.edu> Cc: questions@FreeBSD.ORG Subject: Re: Script to make ppp hangup? Message-ID: <199907032330.AAA73298@dev.lan.awfulhak.org> In-Reply-To: Your message of "Fri, 02 Jul 1999 12:24:41 EDT." <377CE7C9.3E6CC193@glue.umd.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <brian@Awfulhak.org> <brian@FreeBSD.org>
<http://www.Awfulhak.org> <brian@OpenBSD.org>
Don't _EVER_ lose your sense of humour ! <brian@FreeBSD.org.uk>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907032330.AAA73298>
