-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstop.sh
executable file
·48 lines (38 loc) · 1023 Bytes
/
stop.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
#
# stop.sh - will tear down a running docker-compose Demo environment
#
# Usage : ./stop.sh -h
#
set -o errexit -o pipefail -o noclobber -o nounset
cd "$(dirname "$0")"
# Import our helper functions
. ./utils.sh
printHelp() {
echo "Usage: ./stop.sh"
echo "Stops ioFog environments and optionally sets up demo and tutorial environment"
echo ""
echo "Arguments:"
echo " -h, --help print this help / usage"
}
while [[ "$#" -ge 1 ]]; do
case "$1" in
-h|--help)
printHelp
exit 0
;;
*)
echoError "Unrecognized argument: \"$1\""
printHelp
exit 1
;;
esac
done
prettyHeader "Stopping ioFog Demo..."
# Stop ioFog stack
echoInfo "Stopping all containers..."
iofogctl delete all -v || iofogctl disconnect
# Remove generated files
find test/conf -type f -not -name ".gitignore" -exec rm -f {} \;
rm -f "services/iofog/iofog-agent/id_ecdsa.pub"
prettyTitle "ioFog demo is stopped"