mirror of
https://github.com/dockur/windows.git
synced 2024-11-24 17:24:37 +01:00
feat: Only create readme.txt when folder is empty (#552)
This commit is contained in:
parent
09c07d0634
commit
900b520f23
47
src/samba.sh
47
src/samba.sh
@ -21,7 +21,32 @@ if [ ! -d "$share" ] && [ -d "$STORAGE/shared" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$share"
|
mkdir -p "$share"
|
||||||
[ -z "$(ls -A "$share")" ] && chmod 777 "$share"
|
|
||||||
|
if [ -z "$(ls -A "$share")" ]; then
|
||||||
|
|
||||||
|
chmod 777 "$share"
|
||||||
|
|
||||||
|
{ echo "--------------------------------------------------------"
|
||||||
|
echo " $APP for Docker v$(</run/version)..."
|
||||||
|
echo " For support visit $SUPPORT"
|
||||||
|
echo "--------------------------------------------------------"
|
||||||
|
echo ""
|
||||||
|
echo "Using this folder you can share files with the host machine."
|
||||||
|
echo ""
|
||||||
|
echo "To change its location, include the following bind mount in your compose file:"
|
||||||
|
echo ""
|
||||||
|
echo " volumes:"
|
||||||
|
echo " - \"/home/user/example:/shared\""
|
||||||
|
echo ""
|
||||||
|
echo "Or in your run command:"
|
||||||
|
echo ""
|
||||||
|
echo " -v \"/home/user/example:/shared\""
|
||||||
|
echo ""
|
||||||
|
echo "Replace the example path /home/user/example with the desired shared folder."
|
||||||
|
echo ""
|
||||||
|
} | unix2dos > "$share/readme.txt"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
{ echo "[global]"
|
{ echo "[global]"
|
||||||
echo " server string = Dockur"
|
echo " server string = Dockur"
|
||||||
@ -50,26 +75,6 @@ mkdir -p "$share"
|
|||||||
echo " force group = root"
|
echo " force group = root"
|
||||||
} > "/etc/samba/smb.conf"
|
} > "/etc/samba/smb.conf"
|
||||||
|
|
||||||
{ echo "--------------------------------------------------------"
|
|
||||||
echo " $APP for Docker v$(</run/version)..."
|
|
||||||
echo " For support visit $SUPPORT"
|
|
||||||
echo "--------------------------------------------------------"
|
|
||||||
echo ""
|
|
||||||
echo "Using this folder you can share files with the host machine."
|
|
||||||
echo ""
|
|
||||||
echo "To change its location, include the following bind mount in your compose file:"
|
|
||||||
echo ""
|
|
||||||
echo " volumes:"
|
|
||||||
echo " - \"/home/user/example:/shared\""
|
|
||||||
echo ""
|
|
||||||
echo "Or in your run command:"
|
|
||||||
echo ""
|
|
||||||
echo " -v \"/home/user/example:/shared\""
|
|
||||||
echo ""
|
|
||||||
echo "Replace the example path /home/user/example with the desired shared folder."
|
|
||||||
echo ""
|
|
||||||
} | unix2dos > "$share/readme.txt"
|
|
||||||
|
|
||||||
! smbd && smbd --debug-stdout
|
! smbd && smbd --debug-stdout
|
||||||
|
|
||||||
legacy=""
|
legacy=""
|
||||||
|
Loading…
Reference in New Issue
Block a user