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 like
but 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 like
Code:
case `ifconfig rum0|grep inet|awk '{print $2}'` in
xxx.yyy.*) ;;
*) openvpn /etc/openvpn.conf
;;
esac
Suggestions are welcome,
Alphons