Added arbitrary cache rebuild script

This commit is contained in:
crowetic 2025-03-10 08:53:40 -07:00
parent 6ef4ba6623
commit 926962405d

@ -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