From 71171dc989ad0cd5cddb22ebecc3b94b70fbf127 Mon Sep 17 00:00:00 2001 From: belliash Date: Thu, 12 Jan 2012 13:25:29 +0100 Subject: [PATCH] change parameters order --- libraries/common | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/common b/libraries/common index 76c7b2f..92af6bc 100644 --- a/libraries/common +++ b/libraries/common @@ -52,7 +52,7 @@ function checkVersion() { #------------------------------------------------------------------------------- function die() { local STATUS=${2:-1} - notify "${1}" ${STATUS} + notify ${STATUS} "${1}" printError "${1}" echo -ne "\n" exit ${STATUS} @@ -169,12 +169,12 @@ function logOutput() { #------------------------------------------------------------------------------- # Sends an e-mail notification about occured error -# Parameters: %message% %code% +# Parameters: %status% %message% #------------------------------------------------------------------------------- function notify() { if isEnabled ${LOGGING} && isSet NOTIFY && isEnabled ${EZNOTIFY}; then local LOGS="Full output from logs:\n\n$(cat ${LOGFILE})" - local MESG="The ${EZNAME} has failed with code: ${2} and message: ${1}" + local MESG="The ${EZNAME} has failed with code: ${1} and message: ${2}" local TOPIC="The ${EZNAME} process has failed!" echo -e "${MESG}\n${LOGS}" | mailx -s "${TOPIC}" "${NOTIFY}" fi