another openbsd -> ppp

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
Subject: another openbsd -> ppp
On Mon, 30 Jun 2003, Mike Starke wrote:

> And disconnecting is as easy as
> 'poff'


> Now, I do not know how to disconnect without
> killing the process. Certainly there is a more
> gracefull way than 'kill <PID>'?


Have a look at that poff script. Basically it does:
/bin/kill -TERM `pidof pppd`

pidof can be done like:
ps axc -o pid,command | awk "\$2~/^`echo $1`\$/ {print \$1}"

That poff script is so short you could rewrite (with a friendlier
license). (Or choose to just use it on your BSD box.)

Jeremy C. Reed
http://bsd.reedmedia.net/