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.

Quote

#!/bin/bash

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

# Define the shared drive information
nl3s-vm-dsm="//192.168.4.172/nl3s_appdata backup"
nl3b="//192.168.4.216/nl3s_appdata 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."
else
    echo "Failed to mount one or more shared drives."
fi

image.png.b660c4668c8ad0e2a044733fe3e37d63.png

image.thumb.png.6069f613322356d3b5e524d27913dcdf.png

image.thumb.png.6b048742c5139ce7f9a8881c2ba48280.png

northernlight3s-diagnostics-20230524-2340.zip

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.

×
×
  • Create New...