To address the problem of auto-mounting your shares depending on your location in terms of networks, SSID or vpn connected.
I used to solve this with scripts be it with systemd services, cron, fstab in some way (_netdev) etc. But presently I use NetworkManager[1] and it's dispatcher service.
If