#!/bin/bash # Cloudinsight Agent install script. set -e logfile="ci-agent-install.log" gist_request=/tmp/agent-gist-request.tmp gist_response=/tmp/agent-gist-response.tmp if [ $(command -v curl) ]; then cl_cmd="curl -f" else cl_cmd="wget --quiet" fi # Set up a named pipe for logging npipe=/tmp/$$.tmp mknod $npipe p # Log all output to a log for error checking tee <$npipe $logfile & exec 1>&- exec 1>$npipe 2>&1 trap "rm -f $npipe" EXIT function on_error() { printf "