mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 11:25:49 +00:00
feat: Always remove PID file
This commit is contained in:
parent
6c3a876049
commit
8d8b43f1f0
1 changed files with 17 additions and 11 deletions
14
src/samba.sh
14
src/samba.sh
|
|
@ -5,6 +5,8 @@ set -Eeuo pipefail
|
||||||
: "${SAMBA_DEBUG:="N"}" # Disable debug
|
: "${SAMBA_DEBUG:="N"}" # Disable debug
|
||||||
: "${SAMBA_LEVEL:="1"}" # Debug log level
|
: "${SAMBA_LEVEL:="1"}" # Debug log level
|
||||||
|
|
||||||
|
rm -rf /var/run/wsdd.pid
|
||||||
|
|
||||||
[[ "$SAMBA" == [Nn]* ]] && return 0
|
[[ "$SAMBA" == [Nn]* ]] && return 0
|
||||||
[[ "$NETWORK" == [Nn]* ]] && return 0
|
[[ "$NETWORK" == [Nn]* ]] && return 0
|
||||||
|
|
||||||
|
|
@ -40,18 +42,18 @@ addShare() {
|
||||||
echo " For support visit $SUPPORT"
|
echo " For support visit $SUPPORT"
|
||||||
echo "--------------------------------------------------------"
|
echo "--------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Using this folder you can share files with the host machine."
|
echo "Using this folder you can exchange files with the host machine."
|
||||||
echo ""
|
echo ""
|
||||||
echo "To change its 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/example:/${name,,}\""
|
echo " - \"./example:/${name,,}\""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Or in your run command:"
|
echo "Or in your run command:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " -v \"/home/example:/${name,,}\""
|
echo " -v \"\${PWD:-.}/example:/${name,,}\""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Replace the example path /home/example with the desired shared folder."
|
echo "Replace the example path ./example with the desired shared folder."
|
||||||
echo ""
|
echo ""
|
||||||
} | unix2dos > "$dir/readme.txt"
|
} | unix2dos > "$dir/readme.txt"
|
||||||
|
|
||||||
|
|
@ -150,6 +152,8 @@ if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
if [[ "${NETWORK,,}" != "user"* ]]; then
|
||||||
|
|
||||||
# Enable Web Service Discovery on Vista and up
|
# Enable Web Service Discovery on Vista and up
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Starting Web Service Discovery daemon..."
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Starting Web Service Discovery daemon..."
|
||||||
|
|
||||||
|
|
@ -159,6 +163,8 @@ else
|
||||||
wsddn -i "$interface" -H "$hostname" --pid-file=/var/run/wsdd.pid &
|
wsddn -i "$interface" -H "$hostname" --pid-file=/var/run/wsdd.pid &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue