mirror of
https://github.com/dockur/windows.git
synced 2025-10-29 12:15:50 +00:00
feat: readme.txt created only on empty shared folder
This commit is contained in:
parent
01bffba271
commit
2191b40509
3 changed files with 46 additions and 57 deletions
|
|
@ -161,13 +161,6 @@ 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,7 +11,6 @@ set -Eeuo pipefail
|
||||||
: "${LANGUAGE:=""}"
|
: "${LANGUAGE:=""}"
|
||||||
: "${USERNAME:=""}"
|
: "${USERNAME:=""}"
|
||||||
: "${PASSWORD:=""}"
|
: "${PASSWORD:=""}"
|
||||||
: "${README:=""}"
|
|
||||||
|
|
||||||
MIRRORS=5
|
MIRRORS=5
|
||||||
PLATFORM="x64"
|
PLATFORM="x64"
|
||||||
|
|
|
||||||
11
src/samba.sh
11
src/samba.sh
|
|
@ -1,7 +1,6 @@
|
||||||
#!/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
|
||||||
|
|
@ -22,9 +21,9 @@ if [ ! -d "$share" ] && [ -d "$STORAGE/shared" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$share"
|
mkdir -p "$share"
|
||||||
[ -z "$(ls -A "$share")" ] && chmod 777 "$share"
|
if [ -z "$(ls -A "$share")" ] ;then
|
||||||
|
chmod 777 "$share"
|
||||||
{ echo "[global]"
|
{ echo "[global]"
|
||||||
echo " server string = Dockur"
|
echo " server string = Dockur"
|
||||||
echo " netbios name = $hostname"
|
echo " netbios name = $hostname"
|
||||||
echo " workgroup = WORKGROUP"
|
echo " workgroup = WORKGROUP"
|
||||||
|
|
@ -49,9 +48,7 @@ mkdir -p "$share"
|
||||||
echo " guest only = yes"
|
echo " guest only = yes"
|
||||||
echo " force user = root"
|
echo " force user = root"
|
||||||
echo " force group = root"
|
echo " force group = root"
|
||||||
} > "/etc/samba/smb.conf"
|
} > "/etc/samba/smb.conf"
|
||||||
|
|
||||||
if [[ "$README" == [Yy1]* ]] ;then
|
|
||||||
{ echo "--------------------------------------------------------"
|
{ echo "--------------------------------------------------------"
|
||||||
echo " $APP for Docker v$(</run/version)..."
|
echo " $APP for Docker v$(</run/version)..."
|
||||||
echo " For support visit $SUPPORT"
|
echo " For support visit $SUPPORT"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue