]> git.ipfire.org Git - thirdparty/strongswan.git/blame - testing/stop-testing
android: Use activity when reconnecting without (or a possibly wrong) password
[thirdparty/strongswan.git] / testing / stop-testing
CommitLineData
997358a6 1#!/bin/bash
997358a6 2
aafc0a17
RB
3DIR=$(dirname `readlink -f $0`)
4. $DIR/testing.conf
5. $DIR/scripts/function.sh
997358a6 6
9b3316ed 7echo "Stopping test environment"
997358a6 8
9b3316ed
RB
9NETWORKS="vnet1 vnet2 vnet3"
10KNLTARGET=/var/run/kvm-swan-kernel
0593b6c9 11HOSTFSTARGET=/var/run/kvm-swan-hostfs
7a8985b5 12TESTRESULTSTARGET=/var/run/kvm-swan-testresults
997358a6 13
9b3316ed 14[ `id -u` -eq 0 ] || die "You must be root to run $0"
997358a6 15
82499010
RB
16check_commands virsh
17
9b3316ed
RB
18for net in $NETWORKS
19do
20 log_action "Network $net"
21 execute "virsh net-destroy $net"
22done
997358a6 23
9b3316ed 24for host in $STRONGSWANHOSTS
997358a6 25do
9b3316ed 26 log_action "Guest $host"
677795c3 27 execute "virsh shutdown $host"
258cbd40 28 rm -f $VIRTIMGSTORE/$host.$IMGEXT
997358a6 29done
997358a6 30
9b3316ed
RB
31log_action "Removing kernel $KERNEL"
32execute "rm $KNLTARGET"
0593b6c9
RB
33
34log_action "Removing link to hostfs"
35execute "rm $HOSTFSTARGET"
7a8985b5
TB
36
37log_action "Removing link to testresults"
38execute "rm $TESTRESULTSTARGET"