Browse Source

change parameters order

master
belliash 10 years ago
parent
commit
71171dc989
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libraries/common

+ 3
- 3
libraries/common View File

@ -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


Loading…
Cancel
Save