Update samba.sh

This commit is contained in:
Kroese 2024-05-31 07:19:27 +02:00 committed by GitHub
parent 2191b40509
commit 2e91880241
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,8 +21,33 @@ if [ ! -d "$share" ] && [ -d "$STORAGE/shared" ]; then
fi
mkdir -p "$share"
if [ -z "$(ls -A "$share")" ]; then
chmod 777 "$share"
{ echo "--------------------------------------------------------"
echo " $APP for Docker v$(</run/version)..."
echo " For support visit $SUPPORT"
echo "--------------------------------------------------------"
echo ""
echo "Using this folder you can share files with the host machine."
echo ""
echo "To change its location, include the following bind mount in your compose file:"
echo ""
echo " volumes:"
echo " - \"/home/user/example:/shared\""
echo ""
echo "Or in your run command:"
echo ""
echo " -v \"/home/user/example:/shared\""
echo ""
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"
@ -49,26 +74,6 @@ if [ -z "$(ls -A "$share")" ] ;then
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"
echo "--------------------------------------------------------"
echo ""
echo "Using this folder you can share files with the host machine."
echo ""
echo "To change its location, include the following bind mount in your compose file:"
echo ""
echo " volumes:"
echo " - \"/home/user/example:/shared\""
echo ""
echo "Or in your run command:"
echo ""
echo " -v \"/home/user/example:/shared\""
echo ""
echo "Replace the example path /home/user/example with the desired shared folder."
echo ""
} | unix2dos > "$share/readme.txt"
fi
! smbd && smbd --debug-stdout