mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 03:15: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
26
src/samba.sh
26
src/samba.sh
|
|
@ -5,6 +5,8 @@ set -Eeuo pipefail
|
|||
: "${SAMBA_DEBUG:="N"}" # Disable debug
|
||||
: "${SAMBA_LEVEL:="1"}" # Debug log level
|
||||
|
||||
rm -rf /var/run/wsdd.pid
|
||||
|
||||
[[ "$SAMBA" == [Nn]* ]] && return 0
|
||||
[[ "$NETWORK" == [Nn]* ]] && return 0
|
||||
|
||||
|
|
@ -40,18 +42,18 @@ addShare() {
|
|||
echo " For support visit $SUPPORT"
|
||||
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 "To change its location, include the following bind mount in your compose file:"
|
||||
echo ""
|
||||
echo " volumes:"
|
||||
echo " - \"/home/example:/${name,,}\""
|
||||
echo " - \"./example:/${name,,}\""
|
||||
echo ""
|
||||
echo "Or in your run command:"
|
||||
echo ""
|
||||
echo " -v \"/home/example:/${name,,}\""
|
||||
echo " -v \"\${PWD:-.}/example:/${name,,}\""
|
||||
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 ""
|
||||
} | unix2dos > "$dir/readme.txt"
|
||||
|
||||
|
|
@ -150,13 +152,17 @@ if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then
|
|||
|
||||
else
|
||||
|
||||
# Enable Web Service Discovery on Vista and up
|
||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Starting Web Service Discovery daemon..."
|
||||
if [[ "${NETWORK,,}" != "user"* ]]; then
|
||||
|
||||
# Enable Web Service Discovery on Vista and up
|
||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Starting Web Service Discovery daemon..."
|
||||
|
||||
if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then
|
||||
wsddn -i "$interface" -H "$hostname" --unixd --pid-file=/var/run/wsdd.pid
|
||||
else
|
||||
wsddn -i "$interface" -H "$hostname" --pid-file=/var/run/wsdd.pid &
|
||||
fi
|
||||
|
||||
if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then
|
||||
wsddn -i "$interface" -H "$hostname" --unixd --pid-file=/var/run/wsdd.pid
|
||||
else
|
||||
wsddn -i "$interface" -H "$hostname" --pid-file=/var/run/wsdd.pid &
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue