Update
This commit is contained in:
19
services/nfs/install.sh
Normal file
19
services/nfs/install.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
echo "Installing NFS server..."
|
||||
apk add nfs-utils
|
||||
|
||||
# Make mount point directory for sharing
|
||||
mkdir /mnt/shared
|
||||
chmod 777 /mnt/shared
|
||||
chown nobody:nobody /mnt/shared
|
||||
|
||||
# Mount /mnt/shared for all IPs, read-write, root users NOT allowed
|
||||
# nohide: allows nested exports (doesnt hide a folder shared inside another shared folder)
|
||||
cat << EOF > /etc/exports
|
||||
/mnt/shared *(rw,nohide,sync,no_subtree_check,root_squash)
|
||||
EOF
|
||||
|
||||
# Enable and start NFS server
|
||||
exportfs -afv
|
||||
rc-update add nfs
|
||||
rc-service nfs start
|
||||
Reference in New Issue
Block a user