Skip to content

Instantly share code, notes, and snippets.

@sanderploegsma
Created October 12, 2014 15:12
Show Gist options
  • Save sanderploegsma/a1a0c798b77d381f6e5e to your computer and use it in GitHub Desktop.
Save sanderploegsma/a1a0c798b77d381f6e5e to your computer and use it in GitHub Desktop.
Force CouchPotato rescan after download completion
#! /bin/bash
# postdownload.sh by Sander Ploegsma
{
CP_API_KEY="apikeyhere"
CP_HOST="<ip>:<port>"
echo $(date +%Y-%m-%d\ %H:%M:%S) "Forcing CouchPotato rescan..."
curl --silent -X POST "http://$CP_HOST/api/$CP_API_KEY/renamer.scan" > /dev/null
echo $(date +%Y-%m-%d\ %H:%M:%S) "Done."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment