Changed docker-compose command pipe to stderr > $logFile

This commit is contained in:
Asif Bacchus 2018-10-21 03:40:01 -06:00
parent 72c94544b5
commit 5da2183b2c

View File

@ -215,13 +215,13 @@ if [ "$1" = "stop" ]; then
echo -e "${op}${stamp} Stopping ${2}-mailcow container...${normal}" \ echo -e "${op}${stamp} Stopping ${2}-mailcow container...${normal}" \
>> "$logFile" >> "$logFile"
docker-compose stop --timeout ${dockerStopTimeout} ${2}-mailcow \ docker-compose stop --timeout ${dockerStopTimeout} ${2}-mailcow \
>> "$logFile" 2>> "$logFile"
# verify # verify
dockerResult=$(docker inspect -f '{{ .State.ExitCode }}' ${COMPOSE_PROJECT_NAME}_${2}-mailcow_1) dockerResult=$(docker inspect -f '{{ .State.ExitCode }}' ${COMPOSE_PROJECT_NAME}_${2}-mailcow_1)
elif [ "$1" = "start" ]; then elif [ "$1" = "start" ]; then
echo -e "${op}${stamp} Starting ${2}-mailcow container...${normal}" \ echo -e "${op}${stamp} Starting ${2}-mailcow container...${normal}" \
>> "$logFile" >> "$logFile"
docker-compose start ${2}-mailcow >> "$logFile" docker-compose start ${2}-mailcow 2>> "$logFile"
# verify # verify
dockerResult=$(docker inspect -f '{{ .State.Running }}' ${COMPOSE_PROJECT_NAME}_${2}-mailcow_1) dockerResult=$(docker inspect -f '{{ .State.Running }}' ${COMPOSE_PROJECT_NAME}_${2}-mailcow_1)
fi fi