aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-restart.sh
blob: c79467a470c4e5fd335c4e31d8692c3353b6dc7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

#Restart DFC app

docker restart dfc_app0

DFC_APP="$(docker ps -q --filter='name=dfc_app0')"


#Wait for initialization of docker container for dfc app
for i in {1..10}; do
if [ $(docker inspect --format '{{ .State.Running }}' $DFC_APP) ]
 then
   echo "DFC app Running"
   break
 else
   echo sleep $i
   sleep $i
 fi 
done