added cleanup before exiting in checkExist
This commit is contained in:
parent
1a3cfcb729
commit
2ada11039a
@ -219,6 +219,8 @@ function checkExist {
|
|||||||
elif [ "$2" = "error" ]; then
|
elif [ "$2" = "error" ]; then
|
||||||
echo -e "\e[1;31m[`date +%Y-%m-%d` `date +%H:%M:%S`] --ERROR:" \
|
echo -e "\e[1;31m[`date +%Y-%m-%d` `date +%H:%M:%S`] --ERROR:" \
|
||||||
"${3} was not found--\e[0m" >> $logFile
|
"${3} was not found--\e[0m" >> $logFile
|
||||||
|
cleanup 503
|
||||||
|
cleanup sqlDump
|
||||||
quit 101
|
quit 101
|
||||||
else
|
else
|
||||||
# file not found, return proper code
|
# file not found, return proper code
|
||||||
@ -232,6 +234,8 @@ function checkExist {
|
|||||||
else
|
else
|
||||||
echo -e "\e[1;31m[`date +%Y-%m-%d` `date +%H:%M:%S`] --ERROR:" \
|
echo -e "\e[1;31m[`date +%Y-%m-%d` `date +%H:%M:%S`] --ERROR:" \
|
||||||
"Problem creating ${2}--\e[0m" >> $logFile
|
"Problem creating ${2}--\e[0m" >> $logFile
|
||||||
|
cleanUp 503
|
||||||
|
cleanUp sqlDump
|
||||||
quit 102
|
quit 102
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user