Edit the file
/Applications/Tunnelblick.app/Contents/Resources/client.up.osx.sh and add these commands at the end of the file, just before
exit 0 :
su USERNAME -c '
mount_afp afp://afp_username@server/volumename /Volumes/TimeCapsule
Replace USERNAME with your username on the system.
Then add the following at the end of
Do not forget to check the
set nameserver option for your configuration :
Warning : Configuration files
client.(up|down).osx.sh are executed for every connections made using OpenVPN.
This could also be made using
launchd for watching if the vpn connection is up, but I don't know how to use launchd.