I have a rule setup on the /Volumes/ folder. The rule passes a shell script to check if a volume has been mounted and if not, runs an Apple Script to mount the volume.
It used to work without any issue but lately (about a week or two), I've noticed that it doesn't run unless I run the rule manually. When I do, it mounts the drive successfully. The rule preview also passes. When I check the logs it doesn't help as it only shows me the output from when it runs, not why it might not be running.
Any ideas what might be causing it?
Thank you!
The shell script (/bin/bash) on the matching condition is:
- Code: Select all
if [ -d "/Volumes/Media" ]; then exit 1; else exit 0; fi
And the Apple Script is:
- Code: Select all
tell application "Finder"
if not (disk "Media" exists) then
mount volume "afp://user:pass@servername.local/Media/"
end if
end tell
