This is what I use to automount a directory on my desktop via sshfs on my Mac. It's a pretty dirty script that I wrote before I knew a bit more about scripting, so I have to clean it up. I have dual outcomes when they're not necessary. Why not just use a shell script? It works great in my situation.
# startup_actions (Automator action-"Run Shell Script")
# Wait 5 seconds for WiFi to come up
if /sbin/ifconfig | grep 192.168 > /dev/null # Test for network connection anyway
# Mount /home/ninjasb@starbox via sshfs
if /sbin/ifconfig | /usr/bin/grep 192.168.2 > /dev/null
/usr/local/bin/sshfs email@example.com:/home/ninjasb /Volumes/starbox_ninjasb -oreconnect,volname=starbox_ninjasb
/usr/local/bin/sshfs ninjasb@XX.XX.XX.XX:/home/ninjasb /Volumes/starbox_ninjasb -oreconnect,volname=starbox_ninjasb
sleep 1; /opt/local/bin/mpd # Wait 1 second for sshfs mount to settle, then start mpd
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity."
MacBook Pro (Darwin 9), iMac (Darwin 9), iPod Touch (Darwin 9), Dell Optiplex GX620 (FreeBSD 7.1-STABLE)
Last edited by ninjatux; 30th July 2008 at 03:46 AM.