Blame view

docker/PYROS_DOCKER_UPDATE_AND_RESTART 565 Bytes
c755b87f   Etienne Pallier   new script PYROS_...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

abort() {
    echo
    echo "********* !!! ERROR !!! ********"
    # display error msg
    echo $1
    echo "********* !!! ERROR !!! ********"
    echo
    # exit with error
    exit 1
}

# 1) Stop
c755b87f   Etienne Pallier   new script PYROS_...
15
./KILL_PYROS_DOCKER_RUN || abort "Could not kill"
085e388b   Etienne Pallier   added option web ...
16
17
# kill twice to be sure it's really dead !
#./KILL_PYROS_DOCKER_RUN
c755b87f   Etienne Pallier   new script PYROS_...
18
19
20
21
22
23
24
25

# 2) Update
./PYROS_DOCKER_UPDATE || abort "Could not update"

# 3) Test
./PYROS_DOCKER_TEST || abort "TESTS KO"

# 4) Start again
085e388b   Etienne Pallier   added option web ...
26
./PYROS_DOCKER_RUN $1 || abort "Could not run"
c755b87f   Etienne Pallier   new script PYROS_...
27
28
29

# See what's running
./KILL_PYROS_DOCKER_RUN no