forked from medianetlab/katana-slice_manager
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstop.sh
executable file
·41 lines (34 loc) · 961 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
#!/bin/bash
# Check for help option
if [[ " $* " =~ " -h " ]] || [[ " $* " =~ " --help " ]];
then
printf "Usage:\n\tstart.sh [-c | --clear] [-h | --help]\nOptions:
\t[-c | --clear] : Remove the container volumes
\t[-h | --help] : Print this message and quit\n"
exit 0
fi
# Get the options
while [[ $# -gt 0 ]]
do
key=$1
case $key in
-c | --clear)
options="$options -v"
shift
;;
*)
printf "Wrong option %s\n--------\n" "${key}"
printf "Usage:\n\tstart.sh [-c | --clear] [-h | --help]\nOptions:
\t[-c | --clear] : Remove the container volumes
\t[-h | --help] : Print this message and quit\n"
exit 0
;;
esac
done
export KATANA_VERSION=""
# Stop the containers
docker-compose down ${options}
# Remove the monitoring variable
sed -i 's/KATANA_MONITORING=.*/KATANA_MONITORING=/' katana-mngr/.env
# Remove the katana-log files
rm -f katana-nbi/katana.log* katana-mngr/katana.log*