Hello I have been running this script in FileMaker Pro for years now and it has been quite reliable.
I now want to make my process more efficient. I am then starting to run filemaker script on the server than rather on the client.
However, for some of the filemaker scripts a NAS (Synology DS214+) called “FARAMIR” has the be mounted. Up to now there was no issues because those scripts ran on the client.
In running FileMaker server I only have to turn on my Mac mini and the server becomes remotely accessible to all clients. I do not have to logon onto an account and everything for filemaker server to be remotely accessible.
There is an exception, the NAS is not mounted.
Is there a way with an applescript for it to mount the NAS without having to log on? What about super user, would that be the way to go?
With regards!
Thanks
set cancellingscript to "NO"
set mountedFARAMIR to ""
repeat until mountedFARAMIR contains "MOUNTED"
try
set mountedERROR to "NO"
set theping to (do shell script "ping -c 1 -t 1 192.10.5.63")
on error
display dialog "There was a problem connecting to the file server. FARAMIR does not seem to be available at this time. Verify if the server was started and try again" with icon stop buttons {"Cancel", "Keep trying..."}
if button returned of result is "Cancel" then
set cancellingscript to "YES"
end if
set mountedERROR to "YES"
delay 5
end try
if mountedERROR is equal to "NO" or cancellingscript is equal to "YES" then
set mountedFARAMIR to "MOUNTED"
end if
end repeat
if cancellingscript is equal to "NO" then
tell application "Finder"
set mounted_disks to list disks
--display dialog result as string
if mounted_disks does not contain "Data" then
try
mount volume "afp://FARAMIR._afpovertcp._tcp.local/Data"
on error errMSG number errorNumber
display dialog ("There was a problem mounting FARAMIR/DATA : " & errorNumber as text) & ", please notify your system administrator"
return
end try
end if
end tell
delay 3
end if