rclone/fstest/testserver/init.d/TestSMB
Florian Klink aed77a8fb2 tree-wide: replace /bin/bash with /usr/bin/env bash
The latter is more portable, while the former only works on systems
where /bin/bash exists (or is symlinked appropriately).
2024-06-11 12:47:47 +01:00

34 lines
657 B
Bash
Executable File

#!/usr/bin/env bash
set -e
NAME=smb
USER=rclone
PASS=GNF3Cqeu
WORKGROUP=thepub
PORT=28630
. $(dirname "$0")/docker.bash
start() {
docker run --rm -d --name $NAME \
-p 127.0.0.1:${PORT}:445 \
-p 127.0.0.1:${PORT}:445/udp \
dperson/samba \
-p \
-u "rclone;${PASS}" \
-w "${WORKGROUP}" \
-s "public;/share" \
-s "rclone;/rclone;yes;no;no;rclone"
echo type=smb
echo host=127.0.0.1
echo user=$USER
echo port=$PORT
echo pass=$(rclone obscure $PASS)
echo domain=$WORKGROUP
echo _connect=127.0.0.1:${PORT}
}
. $(dirname "$0")/run.bash