From f4f12a653a5c7fd7b59b235439a044fccacd6c0d Mon Sep 17 00:00:00 2001 From: David Personette Date: Fri, 20 Mar 2020 11:30:02 -0400 Subject: [PATCH] samba.sh fix #252 --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.armhf | 2 +- samba.sh | 10 ++++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index d532505..b762136 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,7 +64,7 @@ COPY samba.sh /usr/bin/ EXPOSE 137/udp 138/udp 139 445 HEALTHCHECK --interval=60s --timeout=15s \ - CMD smbclient -L '\\localhost' -U '%' -m SMB3 + CMD smbclient -L \\localhost -U % -m SMB3 VOLUME ["/etc", "/var/cache/samba", "/var/lib/samba", "/var/log/samba",\ "/run/samba"] diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index b5ee447..c9d70c6 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -65,7 +65,7 @@ COPY samba.sh /usr/bin/ EXPOSE 137/udp 138/udp 139 445 HEALTHCHECK --interval=60s --timeout=15s \ - CMD smbclient -L '\\localhost' -U '%' -m SMB3 + CMD smbclient -L \\localhost -U % -m SMB3 VOLUME ["/etc", "/var/cache/samba", "/var/lib/samba", "/var/log/samba",\ "/run/samba"] diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 7f2f284..46d2957 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -65,7 +65,7 @@ COPY samba.sh /usr/bin/ EXPOSE 137/udp 138/udp 139 445 HEALTHCHECK --interval=60s --timeout=15s \ - CMD smbclient -L '\\localhost' -U '%' -m SMB3 + CMD smbclient -L \\localhost -U % -m SMB3 VOLUME ["/etc", "/var/cache/samba", "/var/lib/samba", "/var/log/samba",\ "/run/samba"] diff --git a/samba.sh b/samba.sh index 3945d65..65144c3 100755 --- a/samba.sh +++ b/samba.sh @@ -105,10 +105,12 @@ share() { local share="$1" path="$2" browsable="${3:-yes}" ro="${4:-yes}" \ echo " browsable = $browsable" >>$file echo " read only = $ro" >>$file echo " guest ok = $guest" >>$file - echo -n " veto files = /._*/.apdisk/.AppleDouble/.DS_Store/" >>$file - echo -n ".TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/" >>$file - echo "Network Trash Folder/Temporary Items/Thumbs.db/" >>$file - echo " delete veto files = yes" >>$file + [[ $VETO == no ]] || { + echo -n " veto files = /._*/.apdisk/.AppleDouble/.DS_Store/" >>$file + echo -n ".TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/" >>$file + echo "Network Trash Folder/Temporary Items/Thumbs.db/" >>$file + echo " delete veto files = yes" >>$file + } [[ ${users:-""} && ! ${users:-""} == all ]] && echo " valid users = $(tr ',' ' ' <<< $users)" >>$file [[ ${admins:-""} && ! ${admins:-""} =~ none ]] &&