Skip to content

Instantly share code, notes, and snippets.

@danielloader
Created February 9, 2017 20:39
Show Gist options
  • Save danielloader/3b87265e2371cb102d8a23f44cfb52dd to your computer and use it in GitHub Desktop.
Save danielloader/3b87265e2371cb102d8a23f44cfb52dd to your computer and use it in GitHub Desktop.
#!/bin/bash
#env > /docker/media/log
fullpath="$sonarr_series_path"
rootpath=$1
bwlimit=$2
amzepath=$(echo "$fullpath" | sed "s@$rootpath@@")
#amzepath=$(printf '%q\n' "$sedpath")
>&2 echo "Uploading to ACD"
>&2 echo rclone move --config /docker/media/rclone.conf -c "$sonarr_episodefile_path" "AMZe:$amzepath"
rclone move --config /docker/media/rclone.conf --transfers 30 --bwlimit $bwlimit -c "$sonarr_episodefile_path" "AMZe:$amzepath"
rm -rf /docker/media/LOCAL/.unionfs-fuse
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment