2019-10-04 15:51:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
NAME=rclone-serve-sftp
|
|
|
|
USER=rclone
|
|
|
|
PASS=CranesBallotDorsey5
|
2020-11-10 18:01:15 +00:00
|
|
|
IP=127.0.0.1
|
|
|
|
PORT=28621
|
2019-10-04 15:51:07 +00:00
|
|
|
|
|
|
|
start() {
|
2020-11-10 18:01:15 +00:00
|
|
|
run rclone serve sftp --user $USER --pass $PASS --addr ${IP}:${PORT} ${DATADIR}
|
2019-10-04 15:51:07 +00:00
|
|
|
|
|
|
|
echo type=sftp
|
2020-11-10 18:01:15 +00:00
|
|
|
echo host=${IP}
|
|
|
|
echo port=$PORT
|
2019-10-04 15:51:07 +00:00
|
|
|
echo user=$USER
|
|
|
|
echo pass=$(rclone obscure $PASS)
|
2020-11-10 18:01:15 +00:00
|
|
|
echo _connect=${IP}:${PORT}
|
2019-10-04 15:51:07 +00:00
|
|
|
}
|
|
|
|
|
2020-11-10 18:01:15 +00:00
|
|
|
. $(dirname "$0")/rclone-serve.bash
|