another openbsd -> ppp

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
Eliminar este mensaje
Responder a este mensaje
Autor: Jeremy C. Reed
Fecha:  
Asunto: 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/