vpn 266 B

12345678910111213
  1. #!/bin/bash
  2. # Location: /usr/local/bin/vpn
  3. # Usage: vpn "ppp0" "10.0.0.1" "connection name"
  4. # /etc/crontab
  5. # * * * * * root /usr/local/bin/vpn "ppp0" "10.0.0.1" "vpnconn" >/dev/null
  6. if ! /sbin/ifconfig $1 | grep -q "$2"
  7. then
  8. /usr/bin/poff $3
  9. /usr/bin/pon $3
  10. fi