-
-
Save amirulasyraf88/147a49492388f1dda8aab35065909e48 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