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} ..."
|
logmsg "Finished ${mirror} sync with exit status ${STATUS}${NOOP} ..."
|
||||||
if [ "${POSTCMD}" != "" ]; then
|
if [ "${POSTCMD}" != "" ]; then
|
||||||
logmsg "Running post for ${mirror} ..."
|
logmsg "Running post for ${mirror} ..."
|
||||||
${POSTCMD} 2>&1 | awk \
|
${POSTCMD} 2>&1 | tee >( \
|
||||||
"{ print strftime(\"%Y/%m/%d %H:%M:%S\") \" [$$] \" \$0 }" \
|
awk "{ print strftime(\"%Y/%m/%d %H:%M:%S\") \" [$$] \" \$0 }" \
|
||||||
>> "${LOGFILE}"
|
>> "${LOGFILE}" )
|
||||||
logmsg "Finished post for ${mirror} ..."
|
logmsg "Finished post for ${mirror} ..."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue