Me & @bmillham have been working on a python3 script to automate the setup of an nfs server on osmc, for automounted usb shares. It also assists with non-automounted shares as well. The script can be found here:
I would appreciate if some of you guys could find some time to test, all feedback is welcome. I would suggest running the script as I dry-run to start with, just to get an overview of what it does:
sudo python3 nfs-server-setup.py --dry-run
If the output looks OK after using the --dry-run option, run the script again to actually make the changes:
sudo python3 nfs-server-setup.py
All changes can be reverted by running the uninstall script.:
Currently the script just exports /media, so as a result any auto mounted usb drive under this directory can be mounted client side (or just /media). I’ll look in to replicating it to work with UDisks.
edit:
@sam_nazarko please when you get a minute could you point me to Udisks for SMB, I’ve had a look here:
It just seems to be mounting /media, which is the same as my script.
Being currently its osmc specific, so it may not be a good candidate for the pip store; maybe it will be if/when I can get it to work with UDisks. As for kodi api/dialogs I’ll look in to this when the remaining functionality is added to the script.
Once you’ve tested it out, any ideas or issues; please let me know.
Been looking at exposing the some of the settings as dialog with in kodi, the best way appears to be the xbmcgui module. To use this module with kodi 18, I would need to rewrite the script in python2; which is an option but it may just be better to wait for kodi 19 before adding to the app store.
I’m going to have go getting this to work with a nightly build. I’ll let you know how I get on.
I’ve now created a script that works within kodi, for both kodi 18 & 19; I’ve also created created an uninstall script. Again I would appreciate it if a few of you could test this please.
Hi @Tom_Doyle
i tried and everything works flawlessy. Just one thing tomention. U have not NO_SUBTREE_CHECK flag added to shares. I think this flag is default today.
I´ve got just problem where nfs server or client badly encode filenames with nonstandard chars like ě etc. NFS client in windows shows me instead of the ě just ?? or similar chars. Cant solve that.