Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

macOS users - AutoMount your Shares

Featured Replies

  • Author

That wasn't a dig at you, just a generic joke.

 

Take a breather and start systematically diagnosing. I've given you a lot of pointers, mostly just common sense. Don't get pissy, we're just trying to help.

 

8)

 

  • Replies 232
  • Views 123.7k
  • Created
  • Last Reply

I know, this week has been hell and I have a shit ton of outside work to do as well, so I'm sorry--not getting mad at your, just this whole situation not working out.

 

I go through the logs, posted what I can.

 

I'll create a VMWare image of OS X I guess--but it may be quicker to just re-install unRAID 5.0 TBH.

  • Author

For sure! Leave it until the weekend, focus on work  ;)

Still confused.  Seems I was able to get at least Media to mount as RW now.  But the ping within the script still returns 0 packets when executed via the launchctl.

 

When I run on the command line as myself:

 

ping -q -c 1 tower

 

It sends 1 packet, and returns 1 packet--so, success

 

When I run the script, mount.sh, on the command line:

 

./mount.sh
PING 192.168.1.73 (192.168.1.73): 56 data bytes

--- 192.168.1.73 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.295/0.295/0.295/0.000 ms
Mounting Backup
Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file...
       file -C -m magicfiles
Try `file --help' for more information.
Mounting Media
Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file...
       file -C -m magicfiles
Try `file --help' for more information.

 

I don't know anywhere in the script that calls the 'file' command.  It still mounts the drives ok.

 

I just don't understand why it doesn't work through the .plist ????

  • Author

Just did a search for "file" in my script. The last change I did must have been in TextEdit,  seems spellcheck changed fi to file  !!  However, this does not break the script so launchd will still run it. Your ping issue is very strange... Perhaps try changing the ping attempts to 5-10?

 

I'll change the script download soon. In the meantime, please remove "File" from your script, and then attach a copy of your script here, with everything but passwords in place.

 

Cheers!

Yeah, I think the 'file' was meant to close the 'elif' (since you put the conditional statement backwards to close it -- if -> fi, else -> esle)

 

But there really just needed to be the one 'fi' to close the whole block.  So there is also an extra 'fi' after you correct the 'file' statement--I just commented it out.

 

Attached is my file with my passwords removed.  Thanks for your help!

mount.sh.txt

  • Author

Correct! Cheers for looking into that :)

  • Author

OK so took a look at the script. Very strange, honestly not sure why it's not working via LaunchD.

 

What I'd recommend is rebuilding that plist via an app called "Lingon" to suit your setup. Unless there's something funny with your network and it happens to only drop packets while you try it via Launchd (yeah right), then I can only suggest to try on another Mac to see if that's where the problem lies. Also, try different settings on the Ping command, and echo some debugging text to see where the problem might be lying. You can see most logging activity in the Console. You can add this for displaying text only in console. Either pipe in results, or add text inside quotes after the command:

 

logger -p local0.notice

 

Sorry I can't be of too much help here. In most cases you'd be more knowledgeable on the script side of things, so that's as far as I can go there.

Thanks for your help.  What are some other ping commands I could try?

 

Unfortunately, I only have one Mac, so I can't try that.

 

I will try assigning the onboard NIC back to eth0, and see if LaunchD works with the original NIC.

 

Thanks

 

P.S. Know anywhere to get Lingon for free? Lol, my usual spot doesn't have it--or do you know a freeware app that does the same thing?

 

I could try running the script every minute via crontab

  • Author

PM me your email and I'll email you the free version of Lingon.

 

Edit the ping command to just "ping" without additional options. This will make it more verbose in the logs.

 

Cheers

 

  • 3 weeks later...

Wow, Great work you guys. I am going to have to try this, as I get annoyed of the findered boxes opening up at login.

So do you have a step by step guide written, or an "official" script release? I noticed so many different versions throughout the thread.

 

 

FYI speeding_ant. Is it possible to add the config options (like username, password, IP address) to the .plist file?

 

I feel that may just make everything a bit easier, and less prone for error...if you passed arguments to the script from the launchd plist, instead of editing the script--but that's just me trying to make things more difficult I guess :P

  • Author

Hey Defected - Naw I'm going to leave as it! It seems to work in its current state, and I've got other projects on now!

 

In terms of installation, the instructions on the first page are the "official" instructions. If you get stuck anywhere let me know and I'll amend them to make it easier to follow.

 

Cheers

  • 2 weeks later...

Ok, so without reading 8 pages what script should I use for my mac mini running plex with AFP?  Also what are the latest install instructions?

 

Thanks

Just read the first post.

Thanks, will try this later today

seems to be working, thanks

Does this affect spin down of the drives at all?

  • Author

Shouldn't do at all. It only checks the server once. If the Volumes are mounted, it checks the local computer first before the server.

 

There have been multiple issues with Spin-down in recent unRAID versions. The latest unRAID beta has fixed all my spin-down issues.

  • 4 weeks later...

you tried this in Lion? It seems to be mounting my drives ok (and quietly without big windows popping up), but it isn't starting up iTunes.

 

edit: launching iTunes now after a couple of restarts

Nice stuff.  I may be picking your guys' brains later when I install my server for tips/pointers seeing as how I'm a recent Mac convert i'm still getting used to the mac stuff. 

  • Author

Modified script to fix iTunes launch issue in Lion.

Is this still needed for beta 10?  Ever since I installed this my drives don't spin down.

  • Author

Is what still needed?

 

This script will not keep your drives spun up. Will only spin them up mounting them onto your computer for the first time, then the drives are free to sleep.

  • 1 month later...

Hello speeding_ant.

 

This is a great script and it is working well for me, with one small exception. I am running Lion with multiple users, and using fast user switching. I need for all of my users to have access to the shares once they are mounted and prefer that they all access the same mount point. My goal is to have a single user account setup the auto mount shares at login and for all other users to have access to it (775). Obviously, none would have access until the primary user logged in and auto mounted the shares.

 

The permissions for any shares created by this script is 700, and I can't seem to change it.  Any thoughts on how I could accomplish this? My config on the script posted below.

 

TIA for any help you can provide.

 

erik

 

#-----------------------------#
# Required for share mounting #
#-----------------------------#

# Script Location
SCRIPTLOCATION="/scripts"

# Username for server
USERNAME="****"

# Password for server, check notes
PASSWORD="****"

# IP Address/hostname for ping
PING="10.0.1.201"

# Hostname for server. Try sername.local, hostname or IP
HOSTNAME="Tower"

# Protocol in lowercase, afp or smb
PROTOCOL="afp"

# Shares, check notes
SHARES="shared Videos"

 

 

Output of ls -l on /Volumes

 

iMac:Volumes Erik$ ls -l

total 8

lrwxr-xr-x  1 root  admin    1 Sep 17 15:28 Macintosh HD -> /

drwx------@ 7 Erik  staff  264 Sep 17 15:30 Videos

drwx------@ 9 Erik  staff  264 Sep 17 15:30 shared

 

 

Also notice that in the Get Info window, owner is shown as 'unknown', see attached screenshot.

 

Screen_Shot_2011-09-17_at_3_47.40_PM.png.459dee0a9fde975fec13dc9ef4965ed7.png

Archived

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.