1. Make an Apple script called mount_smb.scpt in ~/Library/Scripts using vi or nano, vi ~/Library/Scripts/mount_smb.scpt

2. Enter the following in the script:
mount volume "smb://username@server/share"

3. Make the script executable, chmod +x ~/Library/Scripts/mount_smb.scpt

4. Install Sleepwatcher using Homebrew, brew install sleepwatcher

5. Start Sleepwatcher, brew services start sleepwatcher. This should register Sleepwatcher to start at login.

6. If not already created, create a wakeup script for Sleepwatcher using vi or nano, vi ~/.wakeup

7. Add the following to the wakeup script: 

#!/bin/bash
osascript ~/Library/Scripts/mount_smb.scpt

8. Make the script executable, chmod +x ~/.wakeup

9. Test the scripts, ~/.wakeup. if the username and password are not already in your keychain, enter them in and check the Remember this password in my keychain checkbox.

After password is in your keychain, you shouldn't have to enter it anymore.

9. To fully test, put the Mac to sleep, enter pmset sleepnow in a terminal window. The Mac should mount the share automatically when it wakes up.