added many

This commit is contained in:
Nick 2021-05-07 12:57:07 -04:00
parent 3e1600a4e0
commit 5dbada192d

16
run.sh
View File

@ -1,11 +1,13 @@
#!/bin/bash
set +x
if [[ -z "${URL}" ]]
then
echo "Please defind a URL"
exit 1
fi
URLs=$(export | grep URL)
#if [[ -z "${URL}" ]]
#then
# echo "Please defind a URL"
# exit 1
#fi
if [[ -z "${BUNNYCDN_API}" ]]
then
@ -13,7 +15,9 @@ then
exit 1
fi
for f in ${URLs | cut -d'=' -f2-)
curl -s -X POST \
-H 'AccessKey: '"${BUNNYCDN_API}"'' \
-H 'Content-Length: 0' \
'https://api.bunny.net/purge?url='"${URL}"
'https://api.bunny.net/purge?url='"${f}"
done