1234567891011121314151617181920212223242526272829303132 |
- #!/bin/sh
- source /jffs/scripts/aiop/aiop-openvpn
- openvpn_run () {
- if [ ${1} -eq 6 ]; then
- unroute_vpn ${2} ${3}
- # Route is down, so we dont care about restarting dnsmasq
- elif [ ${1} -eq 5 ]; then
- route_vpn ${2} ${3}
- service restart_dnsmasq
- fi
- }
- case "${1}" in
- tun11)
- openvpn_run $# "wl0.1" "${1}"
- openvpn_run $# "wl0.3" "${1}"
- ;;
- tun12)
- openvpn_run $# "wl0.2" "${1}"
- ;;
- tun13)
- openvpn_run $# "wl1.1" "${1}"
- ;;
- tun14)
- openvpn_run $# "wl1.2" "${1}"
- ;;
- tun15)
- openvpn_run $# "wl1.3" "${1}"
- ;;
- esac
-
|