Jellyfin Forum
Cant see NAS drive - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Cant see NAS drive (/t-cant-see-nas-drive)

Pages: 1 2


RE: Cant see NAS drive - tmsrxzar - 2024-01-25

(2024-01-25, 09:40 PM)DAFFY Wrote: can i post youtube links here?

why?

are we supposed to watch a youtube video for you then explain the video to you?

such a waste of time


RE: Cant see NAS drive - TheDreadPirate - 2024-01-25

If you can put in a code block the script you used, that would be better so we don't have to watch the vid.


RE: Cant see NAS drive - DAFFY - 2024-01-25

After a bit of playing with the data in the script i have mounted the NAS drive in the /mnt directory. Thanks ALOT for your help..


RE: Cant see NAS drive - DAFFY - 2024-01-25

Code:
#!/bin/bash

set -o errexit

if [[ $EUID -ne 0 ]]; then
  echo "This script must be run as root (use sudo)" 1>&2
  exit 1
fi

sudo apt-get install cifs-utils

echo ""
read -r -p "Enter the address of the NAS folder that you want to mount: " nasaddress
echo ""
read -r -p "Enter the local path where you want to mount the NAS folder: " localaddress
echo ""
read -r -p "Enter the path to store credentials file: " credentialaddress
echo ""
if [ ! -d $localaddress ]; then
    sudo mkdir -p $localaddress
fi
if [ ! -d $credentialaddress ]; then
    sudo mkdir -p $credentialaddress
fi
echo ""
read -r -p "Enter the username of the NAS: " nasusername
echo ""
read -r -p "Enter the NAS password: " naspassword
echo ""

sudo tee -a $credentialaddress/.NASCREDS <<_EOF_
username=$nasusername
password=$naspassword
_EOF_

echo ""
echo "$nasaddress  $localaddress  cifs  credentials=$credentialaddress/.NASCREDS,uid=1000,gid=1000,vers=1.0  0  01" >> /etc/fstab
echo ""
echo ""
echo "@reboot root /bin/bash -c 'sleep 10 && /bin/mount -a'" >> /etc/crontab
echo ""
echo "All done............................."