OpenElec

From RHS Wiki
Revision as of 15:02, 12 October 2018 by Rafahsolis (talk | contribs) (→‎Create service file)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Raspberry Pi OpenElec Mount NFS

Create the directory

mkdir /storage/videos

Create service file

  • The service file name must follow the following pattern

path.replace("/", "-").mount (example for /storage/videos)

nano /storage/.config/system.d/storage-videos.mount
  • Content:
[Unit]
Description=test nfs mount script
Requires=network-online.service
After=network-online.service
Before=kodi.service

[Mount]
What=192.168.0.103:/media/video
Where=/storage/videos
Options=udp,noatime,rsize=32768,wsize=32768,nolock,nfsvers=3
Type=nfs

[Install]
WantedBy=multi-user.target

Music

nano /storage/.config/system.d/storage-music.mount

[Unit]
Description=test nfs mount script
Requires=network-online.service
After=network-online.service
Before=kodi.service

[Mount]
What=192.168.0.103:/media/music
Where=/storage/music
Options=udp,noatime,rsize=32768,wsize=32768,nolock,nfsvers=3
Type=nfs

[Install]
WantedBy=multi-user.target

Start and enable the service

systemctl enable storage-videos.mount
systemctl start storage-videos.mount