docker-nextcloud-stack/stop.sh
yohan ed1f45e8ed Updated Nextcloud version.
Added reverse proxy configuration.
Added optional Nextcloud objectstore configuration.
Added Nextcloud mime configuration.
Added Nextcloud https configuration.
Fixed elasticsearch getting killed when "stop" or "down" is used: due to a docker bug, the new script stop.sh, must be used instead.
2019-12-04 21:41:54 +01:00

23 lines
375 B
Bash
Executable File

#!/bin/bash
sudo docker-compose kill -s SIGTERM
COUNT=1
ATTEMPT=0
while [ $COUNT -ne 0 ] && [ $ATTEMPT -lt 10 ]
do
sleep 1
COUNT=$(sudo docker-compose top | wc -l)
ATTEMPT=$(( $ATTEMPT + 1 ))
done
if [ $COUNT -eq 0 ]
then
sudo docker-compose down
exit 0
else
echo "ERROR: Some containers are still running"
sudo docker-compose ps
exit 1
fi