2024-05-24 10:01:58 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-09-30 15:10:57 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
NAME=smb
|
|
|
|
USER=rclone
|
|
|
|
PASS=GNF3Cqeu
|
|
|
|
WORKGROUP=thepub
|
2024-04-08 15:51:49 +00:00
|
|
|
PORT=28630
|
2022-09-30 15:10:57 +00:00
|
|
|
|
|
|
|
. $(dirname "$0")/docker.bash
|
|
|
|
|
|
|
|
start() {
|
2024-04-08 15:51:49 +00:00
|
|
|
docker run --rm -d --name $NAME \
|
|
|
|
-p 127.0.0.1:${PORT}:445 \
|
|
|
|
-p 127.0.0.1:${PORT}:445/udp \
|
|
|
|
dperson/samba \
|
2022-09-30 15:10:57 +00:00
|
|
|
-p \
|
|
|
|
-u "rclone;${PASS}" \
|
|
|
|
-w "${WORKGROUP}" \
|
|
|
|
-s "public;/share" \
|
|
|
|
-s "rclone;/rclone;yes;no;no;rclone"
|
|
|
|
|
|
|
|
echo type=smb
|
2024-04-08 15:51:49 +00:00
|
|
|
echo host=127.0.0.1
|
2022-09-30 15:10:57 +00:00
|
|
|
echo user=$USER
|
2024-04-08 15:51:49 +00:00
|
|
|
echo port=$PORT
|
2022-09-30 15:10:57 +00:00
|
|
|
echo pass=$(rclone obscure $PASS)
|
|
|
|
echo domain=$WORKGROUP
|
2024-04-08 15:51:49 +00:00
|
|
|
echo _connect=127.0.0.1:${PORT}
|
2022-09-30 15:10:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
. $(dirname "$0")/run.bash
|