macOS users - AutoMount your Shares


Recommended Posts

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

Top Posters In This Topic

  • 1 month later...

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

Link to comment
  • 1 month later...

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

Link to comment
  • 1 month later...
Guest Artemidis

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

Link to comment
  • 4 months later...
  • 2 months later...

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

Link to comment
  • 10 months later...

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!!!!!

Link to comment

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

 

:-\

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.