Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. while [ -z "$RCLONETOKEN" ]; do
  2. >&2 echo -n 'Your rclone token, input "" for empty : '
  3. read RCLONETOKEN
  4. done
  5.  
  6. mkdir -p /root/.config/rclone/
  7.  
  8. if [ $RCLONETOKEN = "" ]; then
  9. /usr/sbin/rclone config && cp /root/.config/rclone/rclone.conf /opt/rclone/rclone.conf
  10.  
  11. else
  12.  
  13. cat > /opt/rclone/rclone.conf <<EOF
  14. [$RCLONEREMOTE]
  15. type = drive
  16. client_id = $RCLONEID
  17. client_secret = $RCLONESECRET
  18. token = $RCLONETOKEN
  19. EOF
  20.  
  21. cat > /root/.config/rclone/rclone.conf <<EOF
  22. [$RCLONEREMOTE]
  23. type = drive
  24. client_id = $RCLONEID
  25. client_secret = $RCLONESECRET
  26. token = $RCLONETOKEN
  27. EOF
  28. fi
  29.  
  30. /usr/sbin/rclone config
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement