github.com/devdivbcp/moby@v17.12.0-ce-rc1.0.20200726071732-2d4bfdc789ad+incompatible/hack/make/.integration-daemon-stop (about) 1 #!/usr/bin/env bash 2 3 if [ ! "$(go env GOOS)" = 'windows' ]; then 4 for pidFile in $(find "$DEST" -name docker.pid); do 5 pid=$([ -n "$TESTDEBUG" ] && set -x; cat "$pidFile") 6 ( 7 [ -n "$TESTDEBUG" ] && set -x 8 kill "$pid" 9 ) 10 if ! wait "$pid"; then 11 echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code" 12 fi 13 root=$(dirname "$pidFile")/root 14 umount "$root" || true 15 done 16 17 if [ -z "$DOCKER_TEST_HOST" ]; then 18 # Stop apparmor if it is enabled 19 if [ -e "/sys/module/apparmor/parameters/enabled" ] && [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then 20 ( 21 [ -n "$TESTDEBUG" ] && set -x 22 /etc/init.d/apparmor stop || true 23 ) 24 fi 25 fi 26 else 27 # Note this script is not actionable on Windows to Linux CI. Instead the 28 # DIND daemon under test is torn down by the Jenkins tear-down script 29 echo "INFO: Not stopping daemon on Windows CI" 30 fi