added many
This commit is contained in:
parent
3e1600a4e0
commit
5dbada192d
16
run.sh
16
run.sh
@ -1,11 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
if [[ -z "${URL}" ]]
|
URLs=$(export | grep URL)
|
||||||
then
|
|
||||||
echo "Please defind a URL"
|
#if [[ -z "${URL}" ]]
|
||||||
exit 1
|
#then
|
||||||
fi
|
# echo "Please defind a URL"
|
||||||
|
# exit 1
|
||||||
|
#fi
|
||||||
|
|
||||||
if [[ -z "${BUNNYCDN_API}" ]]
|
if [[ -z "${BUNNYCDN_API}" ]]
|
||||||
then
|
then
|
||||||
@ -13,7 +15,9 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
for f in ${URLs | cut -d'=' -f2-)
|
||||||
curl -s -X POST \
|
curl -s -X POST \
|
||||||
-H 'AccessKey: '"${BUNNYCDN_API}"'' \
|
-H 'AccessKey: '"${BUNNYCDN_API}"'' \
|
||||||
-H 'Content-Length: 0' \
|
-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