VSCode: cleanup homeassistant on shutdown (#1481)

This commit is contained in:
Pascal Vizeli 2020-02-06 09:41:22 +01:00 committed by GitHub
parent 8115d2b3d3
commit a2f06b1553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,7 @@ function install_cli() {
function setup_test_env() { function setup_test_env() {
mkdir -p /workspaces/test_hassio mkdir -p /workspaces/test_hassio
echo "Start Supervisor"
docker run --rm --privileged \ docker run --rm --privileged \
--name hassio_supervisor \ --name hassio_supervisor \
--security-opt seccomp=unconfined \ --security-opt seccomp=unconfined \
@ -88,6 +89,10 @@ function setup_test_env() {
-e SUPERVISOR_DEV=1 \ -e SUPERVISOR_DEV=1 \
-e HOMEASSISTANT_REPOSITORY="homeassistant/qemux86-64-homeassistant" \ -e HOMEASSISTANT_REPOSITORY="homeassistant/qemux86-64-homeassistant" \
homeassistant/amd64-hassio-supervisor:latest homeassistant/amd64-hassio-supervisor:latest
if docker rm homeassistant 2> /dev/null; then
echo "Cleanup HomeAssistant instance"
fi
} }
echo "Start Test-Env" echo "Start Test-Env"