Update mqtt_container.sh

This commit is contained in:
tteckster 2022-02-03 07:57:21 -05:00 committed by GitHub
parent be3a55b208
commit 0a70be2187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ set -o nounset
set -o pipefail set -o pipefail
shopt -s expand_aliases shopt -s expand_aliases
alias die='EXIT=$? LINE=$LINENO error_exit' alias die='EXIT=$? LINE=$LINENO error_exit'
CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m'
trap die ERR trap die ERR
trap cleanup EXIT trap cleanup EXIT
@ -23,7 +24,6 @@ function error_exit() {
local DEFAULT='Unknown failure occured.' local DEFAULT='Unknown failure occured.'
local REASON="\e[97m${1:-$DEFAULT}\e[39m" local REASON="\e[97m${1:-$DEFAULT}\e[39m"
local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE"
CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m'
msg "$FLAG $REASON" msg "$FLAG $REASON"
[ ! -z ${CTID-} ] && cleanup_ctid [ ! -z ${CTID-} ] && cleanup_ctid
exit $EXIT exit $EXIT