Archived
1
0

fix hook again

This commit is contained in:
Jeff Becker 2016-11-15 08:58:59 -05:00
parent 2527e695dd
commit c0e216a390

View File

@ -3,18 +3,12 @@
# this script can be called via hooks for each post to purge varnish cache on new post # this script can be called via hooks for each post to purge varnish cache on new post
# #
if [ "$3" == "" ] ; then
op="$2"
else
op="$3"
fi
# ip to bind to when doing http request # ip to bind to when doing http request
ip="127.0.1.1" ip="127.0.1.1"
varnish="127.0.0.1:8000" varnish="127.0.0.1:8000"
# purge thread page # purge thread page
curl --interface "$ip" -X PURGE http://$varnish/thread-$(sha1sum <<< "$op" | cut -d' ' -f1).html &> /dev/null curl --interface "$ip" -X PURGE http://$varnish/thread-$(sha1sum <<< "$3" | cut -d' ' -f1).html &> /dev/null
# purge board page # purge board page
curl --interface "$ip" -X PURGE http://$varnish/$1-0.html &> /dev/null curl --interface "$ip" -X PURGE http://$varnish/$1-0.html &> /dev/null