From 926962405dcdb0d11b651c819b83f5699bf59320 Mon Sep 17 00:00:00 2001 From: crowetic Date: Mon, 10 Mar 2025 08:53:40 -0700 Subject: [PATCH] Added arbitrary cache rebuild script --- arbitrary-cache-rebuild.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arbitrary-cache-rebuild.sh diff --git a/arbitrary-cache-rebuild.sh b/arbitrary-cache-rebuild.sh new file mode 100644 index 0000000..97657fb --- /dev/null +++ b/arbitrary-cache-rebuild.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Read API key, removing any trailing newline +API_KEY=$(cat "${HOME}/qortal/apikey.txt" | tr -d '\n') + +# Send the request +curl -X POST localhost:12391/arbitrary/resources/cache/rebuild -H "X-API-KEY: ${API_KEY}" + +# Append argument to file only if provided +if [ -n "$1" ]; then + echo "$1" >> arbitraryCacheComplete.txt +fi