docker/nfs/nfs_setup.sh
2017-05-17 14:27:08 +08:00

16 lines
272 B
Bash
Executable File

#!/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