From 900b520f233b65cea30d508c550db45b02167ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Mu=C3=B1iz?= <2011450+luisgmuniz@users.noreply.github.com> Date: Fri, 31 May 2024 07:24:46 +0200 Subject: [PATCH] feat: Only create readme.txt when folder is empty (#552) --- src/samba.sh | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/src/samba.sh b/src/samba.sh index b6f4654..134e395 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -21,7 +21,32 @@ if [ ! -d "$share" ] && [ -d "$STORAGE/shared" ]; then fi 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$( "$share/readme.txt" + +fi { echo "[global]" echo " server string = Dockur" @@ -50,26 +75,6 @@ mkdir -p "$share" echo " force group = root" } > "/etc/samba/smb.conf" -{ echo "--------------------------------------------------------" - echo " $APP for Docker v$( "$share/readme.txt" - ! smbd && smbd --debug-stdout legacy=""