execute docker-compose exec ops w/o TTY (-T)

This commit is contained in:
Asif Bacchus 2018-10-25 13:47:37 -06:00
parent 7e92495c94
commit ed9db22534

View File

@ -571,7 +571,7 @@ fi
### Dump SQL ### Dump SQL
echo -e "${op}${stamp} Dumping mailcow SQL database...${normal}" >> "$logFile" echo -e "${op}${stamp} Dumping mailcow SQL database...${normal}" >> "$logFile"
docker-compose exec mysql-mailcow mysqldump --default-character-set=utf8mb4 \ docker-compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 \
-u${DBUSER} -p${DBPASS} ${DBNAME} > "$sqlDumpDir/$sqlDumpFile" \ -u${DBUSER} -p${DBPASS} ${DBNAME} > "$sqlDumpDir/$sqlDumpFile" \
2>> "$logFile" 2>> "$logFile"
dumpResult=$(docker-compose exec -T mysql-mailcow echo "$?") dumpResult=$(docker-compose exec -T mysql-mailcow echo "$?")
@ -609,7 +609,7 @@ checkExist ff "$dockerVolumeRedis/dump.rdb"
fi fi
## Export redis ## Export redis
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 -T redis-mailcow redis-cli save >> "$logFile" 2>&1
saveResult=$(docker-compose exec -T redis-mailcow echo "$?") saveResult=$(docker-compose exec -T redis-mailcow echo "$?")
# verify save operation completed successfully # verify save operation completed successfully
if [ "$saveResult" = "0" ]; then if [ "$saveResult" = "0" ]; then