Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while [ -z "$RCLONETOKEN" ]; do
- >&2 echo -n 'Your rclone token, input "" for empty : '
- read RCLONETOKEN
- done
- mkdir -p /root/.config/rclone/
- if [ $RCLONETOKEN = "" ]; then
- /usr/sbin/rclone config && cp /root/.config/rclone/rclone.conf /opt/rclone/rclone.conf
- else
- cat > /opt/rclone/rclone.conf <<EOF
- [$RCLONEREMOTE]
- type = drive
- client_id = $RCLONEID
- client_secret = $RCLONESECRET
- token = $RCLONETOKEN
- EOF
- cat > /root/.config/rclone/rclone.conf <<EOF
- [$RCLONEREMOTE]
- type = drive
- client_id = $RCLONEID
- client_secret = $RCLONESECRET
- token = $RCLONETOKEN
- EOF
- fi
- /usr/sbin/rclone config
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement