aboutsummaryrefslogtreecommitdiff
path: root/docs/installation_1/apache-cache-purge.sh.example
diff options
context:
space:
mode:
authordcc <dcc@logografos.com>2024-05-15 00:57:23 -0700
committerdcc <dcc@logografos.com>2024-05-15 00:57:23 -0700
commitb31a934a804aed3f35442ceafe2080b0955e7317 (patch)
tree947b13a0388ecea81e05dd980baa10f7546860b9 /docs/installation_1/apache-cache-purge.sh.example
parentea33a0d3427f8b30b82a6ddbc0ff7429cfaf8d91 (diff)
downloadanni-master.tar.gz
anni-master.tar.bz2
anni-master.zip
total rebaseHEADmaster
Diffstat (limited to 'docs/installation_1/apache-cache-purge.sh.example')
-rwxr-xr-xdocs/installation_1/apache-cache-purge.sh.example36
1 files changed, 0 insertions, 36 deletions
diff --git a/docs/installation_1/apache-cache-purge.sh.example b/docs/installation_1/apache-cache-purge.sh.example
deleted file mode 100755
index 7b42628..0000000
--- a/docs/installation_1/apache-cache-purge.sh.example
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-# A simple shell script to delete a media from Apache's mod_disk_cache.
-# You will likely need to setup a sudo rule like the following:
-#
-# Cmnd_Alias HTCACHECLEAN = /usr/local/sbin/htcacheclean
-# pleroma ALL=HTCACHECLEAN, NOPASSWD: HTCACHECLEAN
-#
-# Please also ensure you have enabled:
-#
-# config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, url_format: :htcacheclean
-#
-# which will correctly format the URLs passed to this script for the htcacheclean utility.
-#
-
-SCRIPTNAME=${0##*/}
-
-# mod_disk_cache directory
-CACHE_DIRECTORY="/tmp/pleroma-media-cache"
-
-## Removes an item via the htcacheclean utility
-## $1 - the filename, can be a pattern .
-## $2 - the cache directory.
-purge_item() {
- sudo htcacheclean -v -p "${2}" "${1}"
-} # purge_item
-
-purge() {
- for url in $@
- do
- echo "$SCRIPTNAME delete \`$url\` from cache ($CACHE_DIRECTORY)"
- purge_item "$url" $CACHE_DIRECTORY
- done
-}
-
-purge $@