mirror of
https://github.com/dockur/windows.git
synced 2025-10-28 19:55:49 +00:00
feat: optionally disable creation of readme.txt on the shared folder
This commit is contained in:
parent
651bbe74eb
commit
01bffba271
3 changed files with 30 additions and 19 deletions
|
|
@ -161,6 +161,13 @@ kubectl apply -f kubernetes.yml
|
||||||
|
|
||||||
The example folder `/home/user/example` will be available as ` \\host.lan\Data`. You can optionally map this path to a drive letter in Windows, for easier access.
|
The example folder `/home/user/example` will be available as ` \\host.lan\Data`. You can optionally map this path to a drive letter in Windows, for easier access.
|
||||||
|
|
||||||
|
At boot, the file `readme.txt` will be created on the folder unless you disable it:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
README: "N"
|
||||||
|
```
|
||||||
|
|
||||||
* ### How do I install a custom image?
|
* ### How do I install a custom image?
|
||||||
|
|
||||||
In order to download an unsupported ISO image that is not selectable from the list above, specify the URL of that ISO in the `VERSION` environment variable, for example:
|
In order to download an unsupported ISO image that is not selectable from the list above, specify the URL of that ISO in the `VERSION` environment variable, for example:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ set -Eeuo pipefail
|
||||||
: "${LANGUAGE:=""}"
|
: "${LANGUAGE:=""}"
|
||||||
: "${USERNAME:=""}"
|
: "${USERNAME:=""}"
|
||||||
: "${PASSWORD:=""}"
|
: "${PASSWORD:=""}"
|
||||||
|
: "${README:=""}"
|
||||||
|
|
||||||
MIRRORS=5
|
MIRRORS=5
|
||||||
PLATFORM="x64"
|
PLATFORM="x64"
|
||||||
|
|
|
||||||
41
src/samba.sh
41
src/samba.sh
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
: "${README:="Y"}"
|
||||||
: "${SAMBA:="Y"}"
|
: "${SAMBA:="Y"}"
|
||||||
|
|
||||||
[[ "$SAMBA" != [Yy1]* ]] && return 0
|
[[ "$SAMBA" != [Yy1]* ]] && return 0
|
||||||
|
|
@ -50,25 +51,27 @@ mkdir -p "$share"
|
||||||
echo " force group = root"
|
echo " force group = root"
|
||||||
} > "/etc/samba/smb.conf"
|
} > "/etc/samba/smb.conf"
|
||||||
|
|
||||||
{ echo "--------------------------------------------------------"
|
if [[ "$README" == [Yy1]* ]] ;then
|
||||||
echo " $APP for Docker v$(</run/version)..."
|
{ echo "--------------------------------------------------------"
|
||||||
echo " For support visit $SUPPORT"
|
echo " $APP for Docker v$(</run/version)..."
|
||||||
echo "--------------------------------------------------------"
|
echo " For support visit $SUPPORT"
|
||||||
echo ""
|
echo "--------------------------------------------------------"
|
||||||
echo "Using this folder you can share files with the host machine."
|
echo ""
|
||||||
echo ""
|
echo "Using this folder you can share files with the host machine."
|
||||||
echo "To change its location, include the following bind mount in your compose file:"
|
echo ""
|
||||||
echo ""
|
echo "To change its location, include the following bind mount in your compose file:"
|
||||||
echo " volumes:"
|
echo ""
|
||||||
echo " - \"/home/user/example:/shared\""
|
echo " volumes:"
|
||||||
echo ""
|
echo " - \"/home/user/example:/shared\""
|
||||||
echo "Or in your run command:"
|
echo ""
|
||||||
echo ""
|
echo "Or in your run command:"
|
||||||
echo " -v \"/home/user/example:/shared\""
|
echo ""
|
||||||
echo ""
|
echo " -v \"/home/user/example:/shared\""
|
||||||
echo "Replace the example path /home/user/example with the desired shared folder."
|
echo ""
|
||||||
echo ""
|
echo "Replace the example path /home/user/example with the desired shared folder."
|
||||||
} | unix2dos > "$share/readme.txt"
|
echo ""
|
||||||
|
} | unix2dos > "$share/readme.txt"
|
||||||
|
fi
|
||||||
|
|
||||||
! smbd && smbd --debug-stdout
|
! smbd && smbd --debug-stdout
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue