github.com/xhghs/rclone@v1.51.1-0.20200430155106-e186a28cced8/fstest/testserver/init.d/TestSFTPRclone (about)

     1  #!/bin/bash
     2  
     3  set -e
     4  
     5  NAME=rclone-serve-sftp
     6  USER=rclone
     7  PASS=CranesBallotDorsey5
     8  
     9  . $(dirname "$0")/docker.bash
    10  
    11  start() {
    12      docker run --rm -d --name $NAME \
    13             rclone/rclone \
    14             serve sftp --user $USER --pass $PASS --addr :22 /data
    15      
    16      echo type=sftp
    17      echo host=$(docker_ip)
    18      echo user=$USER
    19      echo pass=$(rclone obscure $PASS)
    20      echo _connect=$(docker_ip):22
    21  }
    22  
    23  . $(dirname "$0")/run.bash