Jump to content

macOS users - AutoMount your Shares


speeding_ant

Recommended Posts

  • 1 month later...
  • Replies 232
  • Created
  • Last Reply
Posted

So is the plist named "com.media.mount.plist" or "com.mount.media.plist" as the download had the file named as the later but the instructions state "com.media.mount.plist"?

 

Thanks,

 

Papester

  • 1 month later...
Posted

Small update to script: Added the ability to call "wake" at the end of the script to wake the server, no matter which time limits on wake you've set. eg: /scripts/mount.sh wake

 

Regarding issue with permissions and multi-user, I cannot do anything to fix this with my script (not easily anyway). It appears all AFP transactions are user based. NFS supports multi-user though!

 

Cheers

  • 1 month later...
Posted

hi guys...i'm a newb...i've been trying to get this to work with no luck...

 

Here's what I have:

Mac Mini running Os X 10.7.3

Readynas Duo NV+ [my itunes library is in a share called "media" on this device]

 

Here's what I did:

 

1. Downloaded your file from post 1

 

2. Created a folder called "Scripts" and placed it in what I thought was my root folder [i clicked on the Macintosh HD icon on my desktop and placed folder inside there; I thought this was my root folder.  If it is not, please let me know how I can get there]

 

3. I placed the mount.sh script and wolcmd file in my newly created folder and updated according to your instructions. [i think]  I attached my textedit file just in case - passwords removed.  By the way, my true password contains an "!" so I substituted it with %21 in the script.  The URL encoding site you list does not give this as the special symbol for "!" but other URL encoding sites do.  Is this a problem?  It did not seem to work either way I did it - using a "!" or using the special code.

 

4. I placed the plist file in my user/library/launchagent directory [i turned on hidden files on my mac; I then clicked on the Macintosh HD icon; then the User folders; I then clicked on my username folder represented by the "house" icon; I then clicked on the hidden Library folder; I then clicked on the Launch Agents folder; and then I copied the file over]

 

5.  I then opened Terminal and copied the first line of text you said needed to go in there [minus the dash in front].  I was then prompted to enter my password, which I did.  I then copied the second line of text you said needed to go in there [minus the dash in front].

 

6.  I then restarted my computer, and unfortunately my NAS share called "media" did not automount.

 

You mentioned that if it didn't work to double-check permissions but I'm not sure where exactly you want this to be checked. [inside NAS?; mac mini; permissions to just the script file?]  As I mentioned before, I'm not a computer programmer or developer, but just trying to follow the instructions as listed.  I did navigate to my "Scripts" folder using Finder and clicked "Get Info"  I then changed all privileges for all names listed at the bottom of the window to "Read & Write".  I also did the same for the actual mount.sh file.  However, these changes did not seem to correct the problem.

 

I then attempted to run the checks you mentioned using Terminal.  When I typed in "/Scripts/mount.sh" in the Terminal window, it returned this message:

"/bin/bash: bad interpreter: Operation not permitted"

 

When I typed "launchctl list" in the Terminal window, it returned a list of items and I did notice that it had a 1 in front of the plist file that I added. So, again, this brings me back to the possibility that I did not place the plist file in my root folder.  And I dont know how to get there.

 

Any thoughts, suggestions, solutions?

Thanks in advance!!!

 

mount.sh_screen_shot.png.3a4a99dc5899b3f6efbfbc5e3d08f6c3.png

Posted

Hmmm....just wanted to update my post....

 

Since my NAS has a static IP address, I used my hostname in the mount.sh file.  However, I then changed it and replaced it with the actual IP address....and now my share mounts!! Yay!!

 

It does take about a minute after the startup of my computer, but it does work....fantastic!!

  • 1 month later...
Guest Artemidis
Posted

Hello!

I just wanted to set up this script but I get the this error:

"/bin/bash: bad interpreter: Operation not permitted"

 

I don't where my fault was, the files are in the correct folders and this is what I have set up in the mount.sh file.

 

I also get a 1 when I am trying to run the script in terminal...

Can someone please help me?

Bildschirmfoto_2012-04-15_um_15_54_44.jpg.e72e2c2c30a7a86a696c1b9f057f45f8.jpg

Bildschirmfoto_2012-04-15_um_15_55_52.jpg.a946c7f5d4773583fd4cd1ebe9c50faf.jpg

Bildschirmfoto_2012-04-15_um_15_55_11.jpg.7e34d24934a011769f20dfa381d626f2.jpg

Posted

Hmm. Have you ever saved that file via text edit? Also check the permissions are ok on both the folder and the file. Your user must be set to execute. Just blanket chmod 777 the file to test.

 

Welcome to send me your script file and I'll check it out.

Guest Artemidis
Posted

It still doesn't work for me :(

Is this script running on other 10.7.3 machines?

 

I think this could be the problem:

https://discussions.apple.com/thread/3733712?start=0&tstart=0

 

This should be the solution:

I deleted it using xattr -d com.apple.quarantine script.sh and the script worked again.

 

Testing right now... Yup it works :D

Posted

Same here with Lion 10.7.5, but I can't solve with xattr command

 

When I write this in the terminal

 

xattr -d com.apple.quarantine mount.sh

 

I get this message

 

xattr: mount.sh: No such xattr: com.apple.quarantine

  • 4 months later...
  • 2 months later...
Posted

Hi guys and thanks for this awesome script.

 

I'm trying to get Plex Media Server on my mac to cooperate with the unRAID server. It has problems with the time stamps on the directories on the user share. Now I have to make sure I have all disk shares connected aswell, and these doesn't seem to connect via afp. So, question is: Is it possible to run a second version of this script that point to the disk shares over smb? First one is pointing at the user shares over afp.

 

Thanks

  • 10 months later...
Posted

hi there, I used the script as well for a long time and was very happy about it!

but after the update on Mavericks it does not work any longer  :(

did I do something wrong somewhere?

 

getting the rolling message in the terminal:

 

Hans-Juergens-iMac:dev HJS$ /Scripts/mount.sh

usage: ping [-AaDdfnoQqRrv] [-b boundif] [-c count] [-G sweepmaxsize] [-g sweepminsize]

            [-h sweepincrsize] [-i wait] [-l preload] [-M mask | time] [-m ttl]

            [-p pattern] [-S src_addr] [-s packetsize] [-t timeout]

            [-W waittime] [-z tos] host

      ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload]

            [-M mask | time] [-m ttl] [-p pattern] [-S src_addr]

            [-s packetsize] [-T ttl] [-t timeout] [-W waittime]

            [-z tos] mcast-group

/Scripts/mount.sh: line 193: [: ==: unary operator expected

Attempting to close iTunes

Hans-Juergens-iMac:dev HJS$

 

can anyone maybe have a look please? I have no idea about all this stuff...

 

thanks!!!!!

Posted

today I get the following message in the Terminal:

 

usage: ping [-AaDdfnoQqRrv] [-b boundif] [-c count] [-G sweepmaxsize] [-g sweepminsize]

            [-h sweepincrsize] [-i wait] [-l preload] [-M mask | time] [-m ttl]

            [-p pattern] [-S src_addr] [-s packetsize] [-t timeout]

            [-W waittime] [-z tos] host

      ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload]

            [-M mask | time] [-m ttl] [-p pattern] [-S src_addr]

            [-s packetsize] [-T ttl] [-t timeout] [-W waittime]

            [-z tos] mcast-group

Waking Server

 

Depicus Wake On Lan Command Line

 

Usage: wolcmd [mac address] [ipaddress] [subnet mask] [port number]

 

i.e. wolcmd 009027a322fc 195.188.159.20 255.255.255.0 4343

 

Copyright Depicus (Brian Slack) 1966-2011

 

:-\

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...