From 9dd3edb127133ec7760f34d0fff473ea41154f22 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 7 Feb 2024 21:24:34 +0100 Subject: [PATCH] Update samba.sh --- src/samba.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/samba.sh b/src/samba.sh index 8b13789..a574ff2 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -1 +1,36 @@ +#!/usr/bin/env bash +set -Eeuo pipefail +[[ "$DHCP" == [Yy1]* ]] && return 0 + +{ echo "[global]" + echo " netbios name = dockur" + echo " workgroup = WORKGROUP" + echo " server string = Dockur" + echo " interfaces = dockerbridge" + echo " bind interfaces only = yes" + echo " security = user" + echo " guest account = nobody" + echo " map to guest = Bad User" + echo " server min protocol = SMB2" + echo "" + echo " # disable printing services" + echo " load printers = no" + echo " printing = bsd" + echo " printcap name = /dev/null" + echo " disable spoolss = yes" + echo "" + echo "[data]" + echo " path = /storage" + echo " comment = Storage" + echo " writable = yes" + echo " guest ok = yes" + echo " guest only = yes" + echo " create mode = 0777" + echo " directory mode = 0777" + } > "/etc/samba/smb.conf" + + smbd -D + wsdd -i dockerbridge -n Host -p + + return 0