From d0848b36cf1f864c0f1e65145307cffa85c0e13f Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 4 Jun 2024 15:55:28 +0200 Subject: [PATCH] fix: Error logging for Samba daemon (#562) --- src/samba.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/samba.sh b/src/samba.sh index 134e395..10dd37c 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -75,7 +75,10 @@ fi echo " force group = root" } > "/etc/samba/smb.conf" -! smbd && smbd --debug-stdout +if ! smbd; then + error "Samba daemon failed to start!" + smbd -i --debug-stdout || true +fi legacy="" @@ -86,9 +89,11 @@ if [ -f "$STORAGE/windows.old" ]; then fi if [ -n "$legacy" ]; then - [[ "$DHCP" == [Yy1]* ]] && return 0 # Enable NetBIOS on Windows XP and lower - ! nmbd && nmbd --debug-stdout + if ! nmbd; then + error "NetBIOS daemon failed to start!" + nmbd -i --debug-stdout || true + fi else # Enable Web Service Discovery on Vista and up wsdd -i "$interface" -p -n "$hostname" &