Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Dec 1998 00:07:37 +0000
From:      Brian Somers <brian@Awfulhak.org>
To:        Scott <sgregory@crosslink.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Running a script after connecting with ppp 
Message-ID:  <199812060007.AAA58092@keep.lan.Awfulhak.org>
In-Reply-To: Your message of "Mon, 30 Nov 1998 09:13:57 EST." <3662A825.61E822A6@crosslink.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I would like to run a script (more specifically, I would like to send my
> IP address to a mail account (ifconfig -a | mail user - would suffice))
> whenever my box connects to my provider.  I thought I had seen info on
> this in the past but I cannot find it now.  Any info on how to do this
> would be appreciated.

Try writing the following /etc/ppp/ppp.linkup:

MYADDR:
  !bg sh -c "echo MYADDR | mail user"

You need the ``sh -c'' to understand the ``|''.

> Thanks,
> 
> Scott

-- 
Brian <brian@Awfulhak.org> <brian@FreeBSD.org> <brian@OpenBSD.org>
      <http://www.Awfulhak.org>;
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



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