2
0
mirror of https://github.com/deajan/osync synced 2024-11-03 15:40:14 +00:00

Fixed ambiguous redirect

This commit is contained in:
deajan 2016-12-10 18:37:18 +01:00
parent c5d83a18bf
commit c9635d48d3

View File

@ -3,7 +3,7 @@
#### OFUNCTIONS MINI SUBSET ####
_OFUNCTIONS_VERSION=2.1
_OFUNCTIONS_BUILD=2016121003
_OFUNCTIONS_BUILD=2016121004
_OFUNCTIONS_BOOTSTRAP=true
## BEGIN Generic bash functions written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
@ -217,17 +217,17 @@ function Logger {
_Logger "$prefix($level):$value" "$prefix\e[41m$value\e[0m" true
ERROR_ALERT=true
# ERROR_ALERT / WARN_ALERT isn't set in main when Logger is called from a subprocess. Need to keep this flag.
echo "[$retval] in [$(joinstring < ${FUNCNAME[@]})] SP=$SCRIPT_PID P=$$" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID"
echo "[$retval] in [$(joinstring , ${FUNCNAME[@]})] SP=$SCRIPT_PID P=$$" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID"
return
elif [ "$level" == "ERROR" ]; then
_Logger "$prefix($level):$value" "$prefix\e[91m$value\e[0m" true
ERROR_ALERT=true
echo "[$retval] in [$(joinstring < ${FUNCNAME[@]})] SP=$SCRIPT_PID P=$$" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID"
echo "[$retval] in [$(joinstring , ${FUNCNAME[@]})] SP=$SCRIPT_PID P=$$" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID"
return
elif [ "$level" == "WARN" ]; then
_Logger "$prefix($level):$value" "$prefix\e[33m$value\e[0m" true
WARN_ALERT=true
echo "[$retval] in [$(joinstring < ${FUNCNAME[@]})] SP=$SCRIPT_PID P=$$" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.warn.$SCRIPT_PID"
echo "[$retval] in [$(joinstring , ${FUNCNAME[@]})] SP=$SCRIPT_PID P=$$" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.warn.$SCRIPT_PID"
return
elif [ "$level" == "NOTICE" ]; then
if [ "$_LOGGER_ERR_ONLY" != true ]; then
@ -427,8 +427,6 @@ function SendEmail {
local smtpUser="${9}"
local smtpPassword="${10}"
echo "$subject $message $destinationMails $attachment $senderMail $smtpServer $smtpPort $encryption $smtpUser $smtpPassword"
__CheckArguments 3-10 $# "$@" #__WITH_PARANOIA_DEBUG
local mail_no_attachment=