2017-11-20 22:59:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-11-20 23:30:58 +00:00
|
|
|
set -e
|
2017-11-20 22:59:01 +00:00
|
|
|
|
|
|
|
if [ "$1" = 'zammad-nfs' ]; then
|
2017-11-26 20:25:57 +00:00
|
|
|
echo "creating nfs dir"
|
|
|
|
|
|
|
|
test -d ${NFS_DIR}/data || mkdir -p ${NFS_DIR}/data
|
|
|
|
test -d ${NFS_DIR}/uploads || mkdir -p ${NFS_DIR}/uploads
|
|
|
|
chmod -R 777 ${NFS_DIR}
|
2017-11-20 22:59:01 +00:00
|
|
|
|
|
|
|
echo "create nfs exports"
|
|
|
|
echo "# NFS Export for Zammad" > /etc/exports
|
|
|
|
echo "${NFS_DIR} *(rw,sync,no_subtree_check,fsid=0,no_root_squash)" >> /etc/exports
|
2017-11-26 20:25:57 +00:00
|
|
|
echo "${NFS_DIR}/data *(rw,sync,no_subtree_check,no_root_squash)" >> /etc/exports
|
|
|
|
echo "${NFS_DIR}/uploads *(rw,sync,no_subtree_check,no_root_squash)" >> /etc/exports
|
2017-11-20 22:59:01 +00:00
|
|
|
|
|
|
|
exec runsvdir /etc/sv
|
|
|
|
fi
|