Jump to content

Unraid auto mount delay script

Recommended Posts

I was trying to have a 10min delay on auto mount remote drive to my unraid everytime the array start. I had the following script but didn't work.



# Wait for 10 minutes before attempting to mount the shared drives
sleep 600

# Define the shared drive information
nl3s-vm-dsm="// backup"
nl3b="// backup"

# Mount the shared drives
mount -t cifs -o username=marco,password=19980928MMCmmc "$nl3s-vm-dsm" /mnt/remotes
mount -t cifs -o username=marco,password=19980928MMCmmc "$nl3b" /mnt/remotes

# Verify if the drives are mounted successfully
if mountpoint -q /mnt/remotes; then
    echo "Shared drives mounted successfully."
    echo "Failed to mount one or more shared drives."





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.

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.

  • Create New...