Skip to content
Snippets Groups Projects
Commit ac91240b authored by hench's avatar hench
Browse files

Added a "with SUCCESS" or "with ERROR" to the "BACKUP END ..." line

parent da1a960e
No related branches found
No related tags found
No related merge requests found
......@@ -577,10 +577,13 @@ logupdate(){
echo -e "OS version: \$OS_VER\n" >> \$LOG-short
if [[ \$(grep -m1 ERROR \$LOG-last) ]]; then
grep ERROR \$LOG-last >> \$LOG-short
MSG="with ERROR"
else
MSG="with SUCCESS"
fi
LNO=\$( grep -n 'INFO' \$LOG-last | tail -1 | cut -d":" -f1 )
sed -n "\$LNO,\\\$p" \$LOG-last >> \$LOG-short
echo -e "#### BACKUP END: \$(date +%Y-%m-%d\ %H:%M:%S)" >> \$LOG-short
echo -e "#### BACKUP END: \$(date +%Y-%m-%d\ %H:%M:%S) \$MSG" >> \$LOG-short
cat \$LOG-last >> \$LOG
rm -f \$LOG-last
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment