#!/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