2019-10-04 23:51:07 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
NAME=rclone-sftp-openssh
|
|
|
|
USER=rclone
|
|
|
|
PASS=password
|
2024-04-08 23:51:49 +08:00
|
|
|
PORT=28627
|
2019-10-04 23:51:07 +08:00
|
|
|
|
|
|
|
. $(dirname "$0")/docker.bash
|
|
|
|
|
|
|
|
start() {
|
|
|
|
docker run --rm -d --name ${NAME} \
|
2024-04-08 23:51:49 +08:00
|
|
|
-p 127.0.0.1:${PORT}:22 \
|
2019-10-04 23:51:07 +08:00
|
|
|
rclone/test-sftp-openssh
|
|
|
|
|
|
|
|
echo type=sftp
|
2024-04-08 23:51:49 +08:00
|
|
|
echo host=127.0.0.1
|
|
|
|
echo port=$PORT
|
2019-10-04 23:51:07 +08:00
|
|
|
echo user=$USER
|
|
|
|
echo pass=$(rclone obscure $PASS)
|
2023-09-21 21:55:48 +08:00
|
|
|
echo copy_is_hardlink=true
|
2024-04-08 23:51:49 +08:00
|
|
|
echo _connect=127.0.0.1:${PORT}
|
2019-10-04 23:51:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
. $(dirname "$0")/run.bash
|