Difference between revisions of "OpenElec"

From RHS Wiki
Jump to navigation Jump to search
(Created page with "== Raspberry Pi OpenElec Mount NFS == === Create the directory === mkdir /storage/videos === Create service file === * The service file name must follow the following pattern...")
 
 
Line 8: Line 8:
 
* Content:
 
* Content:
 
  <nowiki>[Unit]
 
  <nowiki>[Unit]
 
 
Description=test nfs mount script
 
Description=test nfs mount script
 
Requires=network-online.service
 
Requires=network-online.service
 
After=network-online.service
 
After=network-online.service
 
Before=kodi.service
 
Before=kodi.service
 
  
 
[Mount]
 
[Mount]
 
 
What=192.168.0.103:/media/video
 
What=192.168.0.103:/media/video
 
Where=/storage/videos
 
Where=/storage/videos
Line 23: Line 20:
  
 
[Install]
 
[Install]
 +
WantedBy=multi-user.target</nowiki>
  
 +
=== Music ===
 +
nano /storage/.config/system.d/storage-music.mount
 +
<nowiki>[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</nowiki>
 
WantedBy=multi-user.target</nowiki>
  

Latest revision as of 15:02, 12 October 2018

Raspberry Pi OpenElec Mount NFS[edit]

Create the directory[edit]

mkdir /storage/videos

Create service file[edit]

  • 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[edit]

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[edit]

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