default config section - roubles/macmounter GitHub Wiki

You can use the default config section to share configs between multiple config sections as follows:

[DEFAULT]
PING_CMD=/sbin/ping -q -c3 -o example.com
WAKE_ATTEMPTS=3

[someremotefolder-example.com]
MOUNT_TEST_CMD=ls -l /Users/roubles/somelocalfolder/
PRE_MOUNT_CMD=/bin/mkdir -p /Users/roubles/somelocalfolder/
MOUNT_CMD=/usr/local/bin/sshfs [email protected]:/someremotefolder /Users/roubles/somelocalfolder/ -oauto_cache,reconnect,volname=example
FOUND_MOUNT_CMD=/bin/echo "" | /usr/bin/mail -s "mounted someremotefolder from example.com!" [email protected]

[someotherfolder-example.com]
MOUNT_TEST_CMD=ls -l /Volumes/someotherfolder && /sbin/mount | grep -q someotherfolder
PRE_MOUNT_CMD=/sbin/umount -f /Volumes/someotherfolder; /bin/mkdir -p /Volumes/someotherfolder
MOUNT_CMD=/sbin/mount -t smbfs "//roubles:[email protected]/someotherremotefolder" /Volumes/someotherfolder
FOUND_MOUNT_CMD=/bin/echo "" | /usr/bin/mail -s "mounted someother folder from example.com!" [email protected]