roXet n00b
Joined: 27 Jun 2002 Posts: 26
|
Posted: Wed Jul 10, 2002 1:47 am Post subject: pon and poff |
|
|
I saw several people asking about the pon and poff scripts somewhere on the fourm. Well I finally found them and I thought Iwould post them here.
Of course you will need to emerge and use ppp-config first, unless you want to configure your ppp stuff by hand. (have fun) =)
Ok, copy and paste these into two diffrent files, save them somewhere good, (I put them in /bin), chmod them 755 (I have been unable to get my users to be able to dial out, but I havn't worked on it much yet).
Here are the scripts
pon
Code: |
#!/bin/sh
# Begin /usr/bin/pon
/usr/sbin/pppd call provider
# End /usr/bin/pon
|
in this script, replace 'provider' with the name of your isp that you entered when you ran ppp-config
Code: |
#!/bin/sh
# Begin /usr/bin/poff
set -- `cat /var/run/ppp*.pid`
case $# in
0)
kill -15 `ps axw|grep "pppd call [[allnum:]]+"|grep -v grep|awk '{print $1}'`
exit 0
;;
1)
kill -15 $1
exit 0
;;
esac
# End /usr/bin/poff
|
This should work as is.
There you go, hope somebody finds this useful. |
|