Automated NFS-Server for Automount Shares

Hi,

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.:

sudo python3 uninstall-nfs-server.py

Thinks Tom.

1 Like

Does this offer identical export behaviour to SMB Server?
Have you seen how we have done this with SMB and UDisks?

If we can match the functionality, we could add it to the App Store.

neat work @Tom_Doyle need to test this out :slight_smile: you should include it on the pip store, if you check the kodi api you can make dialogs in kodi for this

Hi @sam_nazarko,

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.

Hi @Toast,

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.

Thanks Tom.

loads of stuff that are pretty specific on pip that doesnt mean they have no place there

ok cool

1 Like

Exporting /media is just fine. I’ll need to work out how we would expose some of the settings you added to the script.

1 Like

Hi Sam,

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.

Thanks Tom.

1 Like

Focus on Python3 since Python 2 is basically going the way of the dodo bird

1 Like