checkExist: file not found: updated code to 5 and changed occurances
This commit is contained in:
parent
dc95edf22c
commit
14490061c3
@ -223,7 +223,7 @@ function checkExist {
|
|||||||
return 3
|
return 3
|
||||||
else
|
else
|
||||||
# file not found, return proper code
|
# file not found, return proper code
|
||||||
return 3
|
return 5
|
||||||
fi
|
fi
|
||||||
elif [ "$1" = "verify" ]; then
|
elif [ "$1" = "verify" ]; then
|
||||||
if [ -e "$2" ]; then
|
if [ -e "$2" ]; then
|
||||||
@ -280,7 +280,7 @@ function cleanUp {
|
|||||||
# verify actually removed
|
# verify actually removed
|
||||||
checkExist find null "$webroot/$err503FileName"
|
checkExist find null "$webroot/$err503FileName"
|
||||||
checkResult="$?"
|
checkResult="$?"
|
||||||
if [ "$checkResult" = "3" ]; then
|
if [ "$checkResult" = "5" ]; then
|
||||||
echo -e "\e[0;36m...done\e[0m" | tee -a $logFileVerbose \
|
echo -e "\e[0;36m...done\e[0m" | tee -a $logFileVerbose \
|
||||||
$logFileNormal > /dev/null
|
$logFileNormal > /dev/null
|
||||||
else
|
else
|
||||||
@ -298,7 +298,7 @@ function cleanUp {
|
|||||||
# verify actually removed
|
# verify actually removed
|
||||||
checkExist find null "$sqlDumpDir/$sqlDumpFile"
|
checkExist find null "$sqlDumpDir/$sqlDumpFile"
|
||||||
checkResult="$?"
|
checkResult="$?"
|
||||||
if [ "$checkResult" = "3" ]; then
|
if [ "$checkResult" = "5" ]; then
|
||||||
echo -e "\e[0;36m...done\e[0m" >> $logFileVerbose
|
echo -e "\e[0;36m...done\e[0m" >> $logFileVerbose
|
||||||
else
|
else
|
||||||
echo -e "\e[1;33m[`date +%Y-%m-%d` `date +%H:%M:%S`] --WARNING:" \
|
echo -e "\e[1;33m[`date +%Y-%m-%d` `date +%H:%M:%S`] --WARNING:" \
|
||||||
@ -514,7 +514,7 @@ rm -f "$webroot/$err503FileName" 2>&1 | tee -a $logFileVerbose $logFileNormal \
|
|||||||
# verify actually removed
|
# verify actually removed
|
||||||
checkExist find null "$webroot/$err503FileName"
|
checkExist find null "$webroot/$err503FileName"
|
||||||
checkResult="$?"
|
checkResult="$?"
|
||||||
if [ "$checkResult" = "3" ]; then
|
if [ "$checkResult" = "5" ]; then
|
||||||
echo -e "\e[0;36m...done\e[0m" | tee -a $logFileVerbose $logFileNormal \
|
echo -e "\e[0;36m...done\e[0m" | tee -a $logFileVerbose $logFileNormal \
|
||||||
> /dev/null
|
> /dev/null
|
||||||
else
|
else
|
||||||
@ -533,7 +533,7 @@ rm -f "$sqlDumpDir/$sqlDumpFile" >> $logFile 2>&1
|
|||||||
# verify actually removed
|
# verify actually removed
|
||||||
checkExist find null "$sqlDumpDir/$sqlDumpFile"
|
checkExist find null "$sqlDumpDir/$sqlDumpFile"
|
||||||
checkResult="$?"
|
checkResult="$?"
|
||||||
if [ "$checkResult" = "3" ]; then
|
if [ "$checkResult" = "5" ]; then
|
||||||
echo -e "\e[0;36m...done\e[0m" >> $logFileVerbose
|
echo -e "\e[0;36m...done\e[0m" >> $logFileVerbose
|
||||||
else
|
else
|
||||||
echo -e "\e[1;33m[`date +%Y-%m-%d` `date +%H:%M:%S`] --WARNING:" \
|
echo -e "\e[1;33m[`date +%Y-%m-%d` `date +%H:%M:%S`] --WARNING:" \
|
||||||
|
Loading…
Reference in New Issue
Block a user