mirror of
https://github.com/dockur/windows.git
synced 2025-10-28 03:45:48 +00:00
Update samba.sh
This commit is contained in:
parent
2191b40509
commit
2e91880241
1 changed files with 32 additions and 27 deletions
59
src/samba.sh
59
src/samba.sh
|
|
@ -21,34 +21,11 @@ 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 " server string = Dockur"
|
||||
echo " netbios name = $hostname"
|
||||
echo " workgroup = WORKGROUP"
|
||||
echo " interfaces = $interface"
|
||||
echo " bind interfaces only = yes"
|
||||
echo " security = user"
|
||||
echo " guest account = nobody"
|
||||
echo " map to guest = Bad User"
|
||||
echo " server min protocol = NT1"
|
||||
echo ""
|
||||
echo " # disable printing services"
|
||||
echo " load printers = no"
|
||||
echo " printing = bsd"
|
||||
echo " printcap name = /dev/null"
|
||||
echo " disable spoolss = yes"
|
||||
echo ""
|
||||
echo "[Data]"
|
||||
echo " path = $share"
|
||||
echo " comment = Shared"
|
||||
echo " writable = yes"
|
||||
echo " guest ok = yes"
|
||||
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"
|
||||
|
|
@ -68,8 +45,36 @@ if [ -z "$(ls -A "$share")" ] ;then
|
|||
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"
|
||||
echo " interfaces = $interface"
|
||||
echo " bind interfaces only = yes"
|
||||
echo " security = user"
|
||||
echo " guest account = nobody"
|
||||
echo " map to guest = Bad User"
|
||||
echo " server min protocol = NT1"
|
||||
echo ""
|
||||
echo " # disable printing services"
|
||||
echo " load printers = no"
|
||||
echo " printing = bsd"
|
||||
echo " printcap name = /dev/null"
|
||||
echo " disable spoolss = yes"
|
||||
echo ""
|
||||
echo "[Data]"
|
||||
echo " path = $share"
|
||||
echo " comment = Shared"
|
||||
echo " writable = yes"
|
||||
echo " guest ok = yes"
|
||||
echo " guest only = yes"
|
||||
echo " force user = root"
|
||||
echo " force group = root"
|
||||
} > "/etc/samba/smb.conf"
|
||||
|
||||
! smbd && smbd --debug-stdout
|
||||
|
||||
legacy=""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue