#!/bin/bash set -e set -o pipefail ## Colors DEFAULT_COLOR='\033[0m' RED_COLOR='\033[1;31m' function color_string() { if [[ -n $2 ]]; then echo -e "${2}${1}${DEFAULT_COLOR}" else echo -e "${DEFAULT_COLOR}${1}" fi } function log() { local str="$(color_string "$1" $2)" echo -e "$str" } function print_error() { log "$1" $RED_COLOR } print_error "Token is invalid or expired, please regenerate a new script via the Axis Management Console"