fonz
February 19th, 2009, 02:35
Howdy,
I'm toying with the following: I'd like to check whether or not my IP address starts with xxx.yyy and if not, launch openvpn.
I could of course do something likecase `ifconfig rum0|grep inet|awk '{print $2}'` in
xxx.yyy.*) ;;
*) openvpn /etc/openvpn.conf
;;
esacbut I was wondering if there is a more elegant way.
Suggestions are welcome,
Alphons
I'm toying with the following: I'd like to check whether or not my IP address starts with xxx.yyy and if not, launch openvpn.
I could of course do something likecase `ifconfig rum0|grep inet|awk '{print $2}'` in
xxx.yyy.*) ;;
*) openvpn /etc/openvpn.conf
;;
esacbut I was wondering if there is a more elegant way.
Suggestions are welcome,
Alphons