1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/make/.integration-daemon-stop
John Howard a3858873fa Windows CI: No integration daemon stop
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-01-05 10:52:59 -08:00

27 lines
801 B
Bash

#!/bin/bash
if [ ! "$(go env GOOS)" = 'windows' ]; then
trap - EXIT # reset EXIT trap applied in .integration-daemon-start
for pidFile in $(find "$DEST" -name docker.pid); do
pid=$(set -x; cat "$pidFile")
( set -x; kill "$pid" )
if ! wait "$pid"; then
echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code"
fi
done
if [ -z "$DOCKER_TEST_HOST" ]; then
# Stop apparmor if it is enabled
if [ -e "/sys/module/apparmor/parameters/enabled" ] && [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then
(
set -x
/etc/init.d/apparmor stop
)
fi
fi
else
# Note this script is not actionable on Windows to Linux CI. Instead the
# DIND daemon under test is torn down by the Jenkins tear-down script
echo "INFO: Not stopping daemon on Windows CI"
fi