Sleepwatch Script Problem

Discussion in 'Mac Apps and Mac App Store' started by DragonStar, Mar 30, 2008.

  1. DragonStar macrumors newbie

    Joined:
    Mar 30, 2008
    #1
    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:pASSWORD@upstairs/TMBAC* KUP /Volumes/TMBACKUP1

    And the applescript for .mount.scpt is:

    try
    mount volume "smb://USERNAME:pASSWORD@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!
     
  2. qiankun macrumors newbie

    Joined:
    Nov 7, 2008
    #2
    same problem here!
    Part of my applescript is executed, but the mount part doesn't work
     

Share This Page