This commit is contained in:
Maurice
2025-10-03 12:11:49 +02:00
parent b1047238da
commit 7edf0a8c3d
3 changed files with 32 additions and 10 deletions

19
services/nfs/install.sh Normal file
View 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