From c0e216a39099d3fa1f42b4be6e076e68b468f968 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 15 Nov 2016 08:58:59 -0500 Subject: [PATCH] fix hook again --- contrib/tools/hooks/purge-varnish.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/contrib/tools/hooks/purge-varnish.sh b/contrib/tools/hooks/purge-varnish.sh index 24353e3..871bc1c 100755 --- a/contrib/tools/hooks/purge-varnish.sh +++ b/contrib/tools/hooks/purge-varnish.sh @@ -3,18 +3,12 @@ # 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="127.0.1.1" varnish="127.0.0.1:8000" # 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 curl --interface "$ip" -X PURGE http://$varnish/$1-0.html &> /dev/null