From 676f92fdccc54e68a8526da5997a7dd5c2af3d3f Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 13 Oct 2024 11:50:22 +0200 Subject: [PATCH] feat: Rename shared folder --- src/samba.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/samba.sh b/src/samba.sh index 71f9bcf..6a65095 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -14,7 +14,15 @@ if [[ "$DHCP" == [Yy1]* ]]; then interface="$VM_NET_DEV" fi -share="/shared" +share="/data" + +if [ ! -d "$share" ] && [ -d "$STORAGE/data" ]; then + share="$STORAGE/data" +fi + +if [ ! -d "$share" ] && [ -d "/shared" ]; then + share="/shared" +fi if [ ! -d "$share" ] && [ -d "$STORAGE/shared" ]; then share="$STORAGE/shared" @@ -36,11 +44,11 @@ if [ -z "$(ls -A "$share")" ]; then echo "To change its location, include the following bind mount in your compose file:" echo "" echo " volumes:" - echo " - \"/home/user/example:/shared\"" + echo " - \"/home/user/example:/data\"" echo "" echo "Or in your run command:" echo "" - echo " -v \"/home/user/example:/shared\"" + echo " -v \"/home/user/example:/data\"" echo "" echo "Replace the example path /home/user/example with the desired shared folder." echo ""