Update samba.sh
This commit is contained in:
parent
999dee2a17
commit
7bb59a8972
1 changed files with 10 additions and 6 deletions
14
src/samba.sh
14
src/samba.sh
|
|
@ -14,10 +14,14 @@ if [[ "$DHCP" == [Yy1]* ]]; then
|
||||||
interface="$VM_NET_DEV"
|
interface="$VM_NET_DEV"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
share="/shared"
|
||||||
|
|
||||||
|
if [ ! -d "$share" ] && [ -d "$STORAGE/shared" ]; then
|
||||||
share="$STORAGE/shared"
|
share="$STORAGE/shared"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "$share"
|
mkdir -p "$share"
|
||||||
[ -z "$(ls -A "$share")" ] && chmod -R 777 "$share"
|
[ -z "$(ls -A "$share")" ] && chmod 777 "$share"
|
||||||
|
|
||||||
{ echo "[global]"
|
{ echo "[global]"
|
||||||
echo " server string = Dockur"
|
echo " server string = Dockur"
|
||||||
|
|
@ -53,16 +57,16 @@ mkdir -p "$share"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Using this folder you can share files with the host machine."
|
echo "Using this folder you can share files with the host machine."
|
||||||
echo ""
|
echo ""
|
||||||
echo "To change the storage location, include the following bind mount in your compose file:"
|
echo "To change its location, include the following bind mount in your compose file:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " volumes:"
|
echo " volumes:"
|
||||||
echo " - \"/home/user/example:/storage/shared\""
|
echo " - \"/home/user/example:/shared\""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Or in your run command:"
|
echo "Or in your run command:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " -v \"/home/user/example:/storage/shared\""
|
echo " -v \"/home/user/example:/shared\""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Replace the example path /home/user/example with the desired storage folder."
|
echo "Replace the example path /home/user/example with the desired shared folder."
|
||||||
echo ""
|
echo ""
|
||||||
} | unix2dos > "$share/readme.txt"
|
} | unix2dos > "$share/readme.txt"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue