docker/nfs/nfs_setup.sh

16 lines
272 B
Bash
Raw Normal View History

2017-05-17 14:27:08 +08:00
#!/bin/bash
set -e
mounts="${@}"
echo "#NFS Exports" > /etc/exports
for mnt in "${mounts[@]}"; do
src=$(echo $mnt | awk -F':' '{ print $1 }')
mkdir -p $src
echo "$src *(rw,sync,no_subtree_check,fsid=0,no_root_squash)" >> /etc/exports
done
exec runsvdir /etc/sv