Re: Killing specific pid, automaticaly
From: whytewolf (whytewolf_at_techie.com)
Date: 31 Mar 2004 09:10:25 -0800
"MetaL" <email@example.com> wrote in message news:<firstname.lastname@example.org>...
> I have this script,
> pppd call LINK
> route add default gw 192.168.1.62
> and after the fetchnews command finishes i want to kill the pppd to
> terminate the conection (its a VPN client).
> How can i script this....???
> i had an idea like this one
> i need some way to memorise the pid of pppd
> and then use kill -2 <that pid> to terminate the conection
> but how can i get the pid every time?
pppd call LINK &&
route add default gw 192.168.1.62 &&
kill -2 `pidof pppd`