mirror of
https://github.com/dockur/windows.git
synced 2026-06-11 12:49:36 +08:00
feat: Improved start and stop logic (#1758)
This commit is contained in:
+6
-5
@@ -7,9 +7,11 @@ set -Eeuo pipefail
|
||||
tmp="/tmp/smb"
|
||||
rm -rf "$tmp"
|
||||
|
||||
rm -f /var/run/wsdd.pid
|
||||
rm -f /var/run/samba/nmbd.pid
|
||||
rm -f /var/run/samba/smbd.pid
|
||||
DDN_PID="/var/run/wsdd.pid"
|
||||
NMB_PID="/var/run/samba/nmbd.pid"
|
||||
SMB_PID="/var/run/samba/smbd.pid"
|
||||
|
||||
rm -f "$SMB_PID" "$NMB_PID" "$DDN_PID"
|
||||
|
||||
[[ "$SAMBA" == [Nn]* ]] && return 0
|
||||
[[ "$NETWORK" == [Nn]* ]] && return 0
|
||||
@@ -206,10 +208,9 @@ else
|
||||
|
||||
# Enable Web Service Discovery on Vista and up
|
||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Starting wsddn daemon..."
|
||||
|
||||
rm -f /var/log/wsddn.log
|
||||
|
||||
if ! wsddn -i "${interfaces%%,*}" -H "$hostname" --unixd --log-file=/var/log/wsddn.log --pid-file=/var/run/wsdd.pid; then
|
||||
if ! wsddn -i "${interfaces%%,*}" -H "$hostname" --unixd --log-file=/var/log/wsddn.log --pid-file="$DDN_PID"; then
|
||||
SAMBA_DEBUG="Y"
|
||||
error "Failed to start wsddn daemon!"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user