Fixed logging in 503 copy section
This commit is contained in:
parent
db21064b8a
commit
1dfaf9addc
@ -256,8 +256,11 @@ if [ "$checkResult" = "2" ]; then
|
|||||||
else
|
else
|
||||||
# file found, copy it to webroot
|
# file found, copy it to webroot
|
||||||
echo -e "\e[1;36m[`date +%Y-%m-%d` `date +%H:%M:%S`] Copying 503 error" \
|
echo -e "\e[1;36m[`date +%Y-%m-%d` `date +%H:%M:%S`] Copying 503 error" \
|
||||||
"page to NGINX webroot..." >> $logFile
|
"page to NGINX webroot..." | tee -a $logFileVerbose $logFileNormal \
|
||||||
cp $err503FullPath $webroot/ 2>&1 | tee $logFileVerbose $logFileNormal \
|
> /dev/null
|
||||||
|
cp $err503FullPath $webroot/ 2>&1 | tee -a $logFileVerbose $logFileNormal \
|
||||||
|
> /dev/null
|
||||||
|
echo -e "\e[0;36m...done\e[0m" | tee -a $logFileVerbose $logFileNormal \
|
||||||
> /dev/null
|
> /dev/null
|
||||||
# verify copy was successful
|
# verify copy was successful
|
||||||
checkExist find warn "$webroot/$err503FileName"
|
checkExist find warn "$webroot/$err503FileName"
|
||||||
@ -282,6 +285,7 @@ if [ -e $err503FullPath ]; then
|
|||||||
echo -e "\e[1;36m[`date +%Y-%m-%d` `date +%H:%M:%S`] Copying 503 error" \
|
echo -e "\e[1;36m[`date +%Y-%m-%d` `date +%H:%M:%S`] Copying 503 error" \
|
||||||
"page to NGINX webroot..." >> $logFile
|
"page to NGINX webroot..." >> $logFile
|
||||||
cp $err503FullPath $webroot/ &>> $logFile
|
cp $err503FullPath $webroot/ &>> $logFile
|
||||||
|
echo -e "\e[0;36m...done"
|
||||||
# check file actually copied
|
# check file actually copied
|
||||||
if [ -e "$webroot/$err503FileName" ]; then
|
if [ -e "$webroot/$err503FileName" ]; then
|
||||||
echo -e "\e[0;36m...done\e[0m" >> $logFile
|
echo -e "\e[0;36m...done\e[0m" >> $logFile
|
||||||
|
Loading…
Reference in New Issue
Block a user