Skip to content

Instantly share code, notes, and snippets.

@superphly
Forked from sanderploegsma/postdownload.sh
Created April 16, 2018 05:59
Show Gist options
  • Save superphly/6d4903308df4aa1e95d8ac434e744d6c to your computer and use it in GitHub Desktop.
Save superphly/6d4903308df4aa1e95d8ac434e744d6c 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