UnspokenDrop7
Cadet
- Joined
- Jun 21, 2016
- Messages
- 2
Hi everyone,
I'm new to FreeNAS and have run into an problem.
My goal is to make a CIFS share available for my plugins so they can save downloaded content in a place where it's available over my network, especially to my HTPC which is a Windows 10 running Kodi.
I'm running four plugins, each in it's own jail:
Transmission(10.220.0.12): /mnt/diskpool-001/jails/transmission_1/
SABnzbd(10.220.0.13): /mnt/diskpool-001/jails/sabnzbd_1/
SickRage(10.220.0.14): /mnt/diskpool-001/jails/sickrage_1/
Couchpotato(10.220.0.15): /mnt/diskpool-001/jails/couchpotato_1/
And I have shared the following dataset as "//10.220.0.11/downloads":
/mnt/diskpool-001/downloads
What I want to do is to mount the share in each jail to make it available for the application. Also I would like this to be done once and for all or atleast as automatically as possible. For this reason I have created a script like this:
#!/bin/bash
mount_smbfs -I 10.220.0.11 //10.220.0.11/downloads /mnt/diskpool-001/jails/transmission_1/var/db/transmission/downloads
mount_smbfs -I 10.220.0.11 //10.220.0.11/downloads /mnt/diskpool-001/jails/sabnzbd_1/var/db/sabnzbd/downloads
mount_smbfs -I 10.220.0.11 //10.220.0.11/downloads /mnt/diskpool-001/jails/sickrage_1/var/db/sickrage/downloads
mount_smbfs -I 10.220.0.11 //10.220.0.11/downloads /mnt/diskpool-001/jails/couchpotato_1/var/db/couchpotato/downloads
I have checked the syntax by running the script in the console of the FreeNAS and it executes just as I want and I can see that the share is mounted at all four mount points. So running it manually works great!
But now I want to make it run automatically without having to type in the password for each command... and that's when I get into problem. It just seems that FreeNAS will not run my commands.
I have tried creating four Cron Jobs, one for each command, and run it as root and I have tried to execute the script as a postinit script.
I have tried to add "root ALL=(ALL) NOPASSWD: /usr/sbin/mount_smbfs" to visudo.
All without any luck!
Can any one please help?
Is there maybe a better solution?
I'm new to FreeNAS and have run into an problem.
My goal is to make a CIFS share available for my plugins so they can save downloaded content in a place where it's available over my network, especially to my HTPC which is a Windows 10 running Kodi.
I'm running four plugins, each in it's own jail:
Transmission(10.220.0.12): /mnt/diskpool-001/jails/transmission_1/
SABnzbd(10.220.0.13): /mnt/diskpool-001/jails/sabnzbd_1/
SickRage(10.220.0.14): /mnt/diskpool-001/jails/sickrage_1/
Couchpotato(10.220.0.15): /mnt/diskpool-001/jails/couchpotato_1/
And I have shared the following dataset as "//10.220.0.11/downloads":
/mnt/diskpool-001/downloads
What I want to do is to mount the share in each jail to make it available for the application. Also I would like this to be done once and for all or atleast as automatically as possible. For this reason I have created a script like this:
#!/bin/bash
mount_smbfs -I 10.220.0.11 //10.220.0.11/downloads /mnt/diskpool-001/jails/transmission_1/var/db/transmission/downloads
mount_smbfs -I 10.220.0.11 //10.220.0.11/downloads /mnt/diskpool-001/jails/sabnzbd_1/var/db/sabnzbd/downloads
mount_smbfs -I 10.220.0.11 //10.220.0.11/downloads /mnt/diskpool-001/jails/sickrage_1/var/db/sickrage/downloads
mount_smbfs -I 10.220.0.11 //10.220.0.11/downloads /mnt/diskpool-001/jails/couchpotato_1/var/db/couchpotato/downloads
I have checked the syntax by running the script in the console of the FreeNAS and it executes just as I want and I can see that the share is mounted at all four mount points. So running it manually works great!
But now I want to make it run automatically without having to type in the password for each command... and that's when I get into problem. It just seems that FreeNAS will not run my commands.
I have tried creating four Cron Jobs, one for each command, and run it as root and I have tried to execute the script as a postinit script.
I have tried to add "root ALL=(ALL) NOPASSWD: /usr/sbin/mount_smbfs" to visudo.
All without any luck!
Can any one please help?
Is there maybe a better solution?