replaced redis err check w/ verification of success string piped to log
This commit is contained in:
parent
9bd6c9d431
commit
5af5a064a9
@ -580,9 +580,9 @@ checkExist fs "$sqlDumpDir/$sqlDumpFile"
|
|||||||
### Save redis state
|
### Save redis state
|
||||||
echo -e "${op}${stamp} Saving redis state information...${normal}" >> "$logFile"
|
echo -e "${op}${stamp} Saving redis state information...${normal}" >> "$logFile"
|
||||||
docker-compose exec redis-mailcow redis-cli save >> "$logFile" 2>&1
|
docker-compose exec redis-mailcow redis-cli save >> "$logFile" 2>&1
|
||||||
checkResult=$(docker-compose exec -T redis-mailcow echo "$?")
|
## redis outputs a simple 'OK' if the export succeeded, so check the log file
|
||||||
# Verify save was successful
|
## for a line just written that says that specifically
|
||||||
if [ "$checkResult" = 0 ]; then
|
if [ $(tail -1 "$logFile") = "OK" ];
|
||||||
echo -e "${ok}${stamp} -- [SUCCESS] redis state saved --${normal}" \
|
echo -e "${ok}${stamp} -- [SUCCESS] redis state saved --${normal}" \
|
||||||
>> "$logFile"
|
>> "$logFile"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user