mirror of
https://github.com/dockur/windows.git
synced 2025-10-28 19:55:49 +00:00
Update samba.sh
This commit is contained in:
parent
2191b40509
commit
2e91880241
1 changed files with 32 additions and 27 deletions
51
src/samba.sh
51
src/samba.sh
|
|
@ -21,9 +21,34 @@ if [ ! -d "$share" ] && [ -d "$STORAGE/shared" ]; then
|
|||
fi
|
||||
|
||||
mkdir -p "$share"
|
||||
if [ -z "$(ls -A "$share")" ] ;then
|
||||
|
||||
if [ -z "$(ls -A "$share")" ]; then
|
||||
|
||||
chmod 777 "$share"
|
||||
{ echo "[global]"
|
||||
|
||||
{ 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 " server string = Dockur"
|
||||
echo " netbios name = $hostname"
|
||||
echo " workgroup = WORKGROUP"
|
||||
|
|
@ -48,27 +73,7 @@ if [ -z "$(ls -A "$share")" ] ;then
|
|||
echo " guest only = yes"
|
||||
echo " force user = root"
|
||||
echo " force group = root"
|
||||
} > "/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"
|
||||
fi
|
||||
} > "/etc/samba/smb.conf"
|
||||
|
||||
! smbd && smbd --debug-stdout
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue