Logger "Cannot send alert email via /usr/local/bin/mail.php (pfsense) !!!""WARN"
else
Logger "Sent alert mail using pfSense mail.php.""NOTICE"
return0
fi
fi
# If function has not returned 0 yet, assume it's critical that no alert can be sent
Logger "Cannot send alert (neither mutt, mail, sendmail, sendemail or pfSense mail.php could be used).""ERROR"# Is not marked critical because execution must continue
}
function TrapError {
localjob="$0"
localline="$1"
@ -365,10 +445,12 @@ function Spinner {
esac
}
# obsolete, use StripQuotes
function SedStripQuotes {
echo$(echo$1| sed "s/^\([\"']\)\(.*\)\1\$/\2/g")
}
# Usage: var=$(StripSingleQuotes "$var")
function StripSingleQuotes {
localstring="${1}"
string="${string/#\'/}"# Remove singlequote if it begins string
Logger "Cannot send alert email via /usr/local/bin/mail.php (pfsense) !!!""WARN"
else
Logger "Sent alert mail using pfSense mail.php.""NOTICE"
return0
fi
fi
# If function has not returned 0 yet, assume it's critical that no alert can be sent
Logger "Cannot send alert (neither mutt, mail, sendmail, sendemail or pfSense mail.php could be used).""ERROR"# Is not marked critical because execution must continue
}
function TrapError {
localjob="$0"
localline="$1"
@ -356,10 +436,12 @@ function Spinner {
esac
}
# obsolete, use StripQuotes
function SedStripQuotes {
echo$(echo$1| sed "s/^\([\"']\)\(.*\)\1\$/\2/g")
}
# Usage: var=$(StripSingleQuotes "$var")
function StripSingleQuotes {
localstring="${1}"
string="${string/#\'/}"# Remove singlequote if it begins string
Logger "Cannot send alert email via /usr/local/bin/mail.php (pfsense) !!!""WARN"
else
Logger "Sent alert mail using pfSense mail.php.""NOTICE"
return0
fi
fi
# If function has not returned 0 yet, assume it's critical that no alert can be sent
Logger "Cannot send alert (neither mutt, mail, sendmail, sendemail or pfSense mail.php could be used).""ERROR"# Is not marked critical because execution must continue
}
function TrapError {
localjob="$0"
localline="$1"
@ -352,10 +431,12 @@ function Spinner {
esac
}
# obsolete, use StripQuotes
function SedStripQuotes {
echo$(echo$1| sed "s/^\([\"']\)\(.*\)\1\$/\2/g")
}
# Usage: var=$(StripSingleQuotes "$var")
function StripSingleQuotes {
localstring="${1}"
string="${string/#\'/}"# Remove singlequote if it begins string