Last active
August 25, 2019 17:03
-
-
Save nawawi/a5c0d7601bf94a72977132a41be78bbe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# please refer to https://github.com/nawawi/nginx-cache-data/blob/master/nginx-proxy-cache-data.sh | |
cat /tmp/nginx-proxy-cache-data/data-file-cache.txt |grep -v ^# |tr -s '|' ' ' |while read _host _size _url; do | |
_purge="$(echo $_url|sed -e "s/$_host/${_host}\/purge/g")"; | |
_output="$(curl -s -H "Host: ${_host}" ${_purge}*)"; | |
echo $_output; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment