You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
696 B

#!/bin/bash
#export SWARMLAB_token=2a6594ae1ad9d978a35087af21b9eeef6ed0912e
#export SWARMLAB_name=ondemand_playgroundnodejs_masterNqGMumYI
if [ ! -z $SWARMLAB_token ] && [ ! -z $SWARMLAB_name ]; then
filetmp1=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 10 ; echo '')
curl -k -X POST https://api.swarmlab.io/swarmlabrunhotreload \
-H "Authorization: Bearer $SWARMLAB_token" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data "{\"swarmlabname\":\"$SWARMLAB_name\"}" > /tmp/$filetmp-res.json
jq '.' /tmp/$filetmp-res.json
else
echo "export SWARMLAB_token=token SWARMLAB_name=swarmlabname"
fi