added many
This commit is contained in:
parent
3e1600a4e0
commit
5dbada192d
16
run.sh
16
run.sh
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user