mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 19:35:49 +00:00
Update samba.sh
This commit is contained in:
parent
17cb1d4c58
commit
516cf9f33f
1 changed files with 12 additions and 10 deletions
22
src/samba.sh
22
src/samba.sh
|
|
@ -4,9 +4,12 @@ set -Eeuo pipefail
|
||||||
[[ "$DHCP" == [Yy1]* ]] && return 0
|
[[ "$DHCP" == [Yy1]* ]] && return 0
|
||||||
|
|
||||||
SHARE="$STORAGE/shared"
|
SHARE="$STORAGE/shared"
|
||||||
|
|
||||||
mkdir -p "$SHARE"
|
mkdir -p "$SHARE"
|
||||||
chmod -R 777 "$SHARE"
|
chmod -R 777 "$SHARE"
|
||||||
|
|
||||||
|
SAMBA="/etc/samba/smb.conf"
|
||||||
|
|
||||||
{ echo "[global]"
|
{ echo "[global]"
|
||||||
echo " server string = Dockur"
|
echo " server string = Dockur"
|
||||||
echo " netbios name = dockur"
|
echo " netbios name = dockur"
|
||||||
|
|
@ -32,29 +35,28 @@ chmod -R 777 "$SHARE"
|
||||||
echo " guest only = yes"
|
echo " guest only = yes"
|
||||||
echo " force user = root"
|
echo " force user = root"
|
||||||
echo " force group = root"
|
echo " force group = root"
|
||||||
} > "/etc/samba/smb.conf"
|
} > "$SAMBA"
|
||||||
|
|
||||||
{ echo "------------------------------------------------"
|
{ echo "--------------------------------------------------------"
|
||||||
echo "$APP for Docker v$(</run/version)..."
|
echo " $APP for Docker v$(</run/version)..."
|
||||||
echo "For support visit $SUPPORT"
|
echo " For support visit $SUPPORT"
|
||||||
echo "------------------------------------------------"
|
echo "--------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Using this folder you can share files with the host machine."
|
echo "Using this folder you can share files with the host machine."
|
||||||
echo ""
|
echo ""
|
||||||
echo "To change the storage location, include the following bind mount in your compose file:"
|
echo "To change the storage location, include the following bind mount in your compose file:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " volumes:"
|
echo " volumes:"
|
||||||
echo " - /home/user/example:/storage/shared"
|
echo " - \"/home/user/example:/storage/shared\""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Or in your run command:"
|
echo "Or in your run command:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " -v \"/home/user/example:/storage/shared\""
|
echo " -v \"/home/user/example:/storage/shared\""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Replace the example path /home/user/example with the desired storage folder."
|
echo "Replace the example path /home/user/example with the desired storage folder."
|
||||||
echo ""
|
echo ""
|
||||||
} > "$SHARE/readme.txt"
|
} | unix2dos > "$SHARE/readme.txt"
|
||||||
|
|
||||||
unix2dos "$SHARE/readme.txt"
|
|
||||||
smbd -D
|
smbd -D
|
||||||
wsdd -i dockerbridge -p -n "host.local" &
|
wsdd -i dockerbridge -p -n "host.local" &
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue