Page 5 of 5 FirstFirst ... 345
Results 41 to 44 of 44

Thread: Sync Script

  1. #41
    Join Date
    Sep 2008
    Location
    metro detriot area
    Beans
    269
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Sync Script

    yeah . . now thinking about it that is a pointless line lol

    hmm . . . now i think it might be working, but it opens and closes too fast so i can't really troubleshoot it.

    so i added a "press anykey to close" command . . .

    and now it's not syncing which is good . . but it's not running the else . . it's trying but not running it

    fails to rmdir

  2. #42
    Join Date
    Sep 2008
    Location
    your profile
    Beans
    628
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Sync Script

    You may want to ensure that the /media/ServerMusic on your actual hard drive is empty; your earlier problems probably caused files to be put there.

  3. #43
    Join Date
    Nov 2006
    Location
    Oregon
    Beans
    4,296
    Distro
    Ubuntu Development Release

    Re: Sync Script

    Ok, i've been playing around with this for a bit and this code works for detecting my usb drive being attached. You should just need to edit /media/PENDRIVE to /media/ServerMusic

    It should still work because we aren't checking if the directory exists, but rather that it is a mount point.

    Obviously you would need to add in your mount and remove commands, but I would just test this first
    Code:
    grep -q /media/PENDRIVE /etc/mtab
    if [ $? == 0 ]; then
      echo "sync successful"
    else
      echo "mount failed"
    fi

  4. #44
    Join Date
    Sep 2008
    Location
    metro detriot area
    Beans
    269
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Sync Script

    i have to use the password to access the server shares . . i did change it to rmdir

    after more troubleshooting, it is running the else section, but it two commands are running

    umount and rmdir

    those two in the code don't do anything and come with an error "device is busy"

Page 5 of 5 FirstFirst ... 345

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •