Hey all,
Trying to get a network drive to automount upon wakeup using Sleepwatcher. The shell script that it executes fine when run from terminal, but only some parts seem to work when it's run upon wakeup.
I've tried to do it both using applescript and directly, hence the two different modes in it:
#!/bin/sh
sleep 20
osascript ~/.mount.scpt
mkdir /volumes/TMBACKUP1
mount_smbfs //USERNAME
ASSWORD@upstairs/TMBAC* KUP /Volumes/TMBACKUP1
And the applescript for .mount.scpt is:
try
mount volume "smb://USERNAME
ASSWORD@upstairs/* TMBACKUP"
end try
All componenents work fine on their own, for instance, typing osascript ~/.mount.scpt mounts the drive, as does running ~/.wakeup (what the first script is called), that also works. But when run from wakeup the directory is created, but neither the applescript or mount seem to work, at least the directory is empty afterwards.
Does anyone have any suggestions for me? I'm getting very frustrated over this!
Trying to get a network drive to automount upon wakeup using Sleepwatcher. The shell script that it executes fine when run from terminal, but only some parts seem to work when it's run upon wakeup.
I've tried to do it both using applescript and directly, hence the two different modes in it:
#!/bin/sh
sleep 20
osascript ~/.mount.scpt
mkdir /volumes/TMBACKUP1
mount_smbfs //USERNAME
And the applescript for .mount.scpt is:
try
mount volume "smb://USERNAME
end try
All componenents work fine on their own, for instance, typing osascript ~/.mount.scpt mounts the drive, as does running ~/.wakeup (what the first script is called), that also works. But when run from wakeup the directory is created, but neither the applescript or mount seem to work, at least the directory is empty afterwards.
Does anyone have any suggestions for me? I'm getting very frustrated over this!