mirror: Print postcmd output to log and console
This commit is contained in:
parent
e099ee58ab
commit
5f8723c9c9
1 changed files with 3 additions and 3 deletions
|
@ -118,9 +118,9 @@ for mirror in ${SYNC} ; do
|
|||
logmsg "Finished ${mirror} sync with exit status ${STATUS}${NOOP} ..."
|
||||
if [ "${POSTCMD}" != "" ]; then
|
||||
logmsg "Running post for ${mirror} ..."
|
||||
${POSTCMD} 2>&1 | awk \
|
||||
"{ print strftime(\"%Y/%m/%d %H:%M:%S\") \" [$$] \" \$0 }" \
|
||||
>> "${LOGFILE}"
|
||||
${POSTCMD} 2>&1 | tee >( \
|
||||
awk "{ print strftime(\"%Y/%m/%d %H:%M:%S\") \" [$$] \" \$0 }" \
|
||||
>> "${LOGFILE}" )
|
||||
logmsg "Finished post for ${mirror} ..."
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue