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