Created
September 30, 2015 03:43
-
-
Save OneCricketeer/3a86dfa6cdf9c43f6619 to your computer and use it in GitHub Desktop.
OpenElec startup NFS script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
( | |
IP_ADDR=192.168.1.5 | |
LOCAL_DIR=/storage | |
NFS_USERNAME='' | |
NFS_PASS='' | |
NFS_DIR=Media # Note: no leading slash needed | |
sleep 30 | |
for path in videos music tvshows recordings downloads pictures emulators screenshots; do | |
rm -rf "${LOCAL_DIR}/${path}" | |
done | |
for path in Movies Television Cartoons Documentaries Music MediaAddons Downloads; do | |
mkdir -p "${LOCAL_DIR}/${path}" | |
done | |
for path in Movies Television Cartoons Documentaries Music MediaAddons; do | |
mount -t cifs -o username=$NFS_USERNAME,password=$NFS_PASS "//${IP_ADDR}/${NFS_DIR}/${path}" "${LOCAL_DIR}/${path}" | |
done | |
mount -t cifs -o username=$NFS_USERNAME,password=$NFS_PASS "//${IP_ADDR}/Downloads" "${LOCAL_DIR}/Downloads" | |
)& |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment