Commit 085e388b16c5b589bae308f869bacb5b142aecf4
1 parent
10ebce4d
Exists in
dev
added option web - only - to PYROS_DOCKER_RUN
Showing
3 changed files
with
17 additions
and
7 deletions
Show diff stats
docker/PYROS_DOCKER_RUN
@@ -14,6 +14,12 @@ fi | @@ -14,6 +14,12 @@ fi | ||
14 | #docker exec pyros python3 pyros.py start webserver $@ > ../../LOG_PYROS_webserver.log 2>&1 & | 14 | #docker exec pyros python3 pyros.py start webserver $@ > ../../LOG_PYROS_webserver.log 2>&1 & |
15 | docker exec pyros python3 pyros.py start -o tnc webserver > ../../LOG_PYROS_webserver.log 2>&1 & | 15 | docker exec pyros python3 pyros.py start -o tnc webserver > ../../LOG_PYROS_webserver.log 2>&1 & |
16 | 16 | ||
17 | +# exit if webserver only | ||
18 | +#[[ $1 == "web" ]] && exit | ||
19 | + | ||
20 | +# Go on only if not "web" | ||
21 | +if [[ $1 != "web" ]] ; then | ||
22 | + | ||
17 | # 2) PLC simulator | 23 | # 2) PLC simulator |
18 | # - Display log on current terminal | 24 | # - Display log on current terminal |
19 | #docker exec -it pyros bash -c "cd simulators/plc/ ; ./plcSimulator.py" | 25 | #docker exec -it pyros bash -c "cd simulators/plc/ ; ./plcSimulator.py" |
@@ -26,7 +32,12 @@ docker exec pyros bash -c "cd simulators/plc/ ; ./plcSimulator.py" > ../../LOG_P | @@ -26,7 +32,12 @@ docker exec pyros bash -c "cd simulators/plc/ ; ./plcSimulator.py" > ../../LOG_P | ||
26 | # - Save log in file | 32 | # - Save log in file |
27 | docker exec pyros python3 pyros.py start agentM > ../../LOG_PYROS_agent_monitoring.log 2>&1 & | 33 | docker exec pyros python3 pyros.py start agentM > ../../LOG_PYROS_agent_monitoring.log 2>&1 & |
28 | 34 | ||
35 | +fi | ||
36 | + | ||
37 | + | ||
38 | + | ||
29 | # SEE ALL PROCESSES LAUNCHED | 39 | # SEE ALL PROCESSES LAUNCHED |
40 | +sleep 3 | ||
30 | ./KILL_PYROS_DOCKER_RUN no | 41 | ./KILL_PYROS_DOCKER_RUN no |
31 | 42 | ||
32 | 43 |
docker/PYROS_DOCKER_UPDATE_AND_RESTART
@@ -12,9 +12,9 @@ abort() { | @@ -12,9 +12,9 @@ abort() { | ||
12 | } | 12 | } |
13 | 13 | ||
14 | # 1) Stop | 14 | # 1) Stop |
15 | -# kill twice to be sure it's really dead ! | ||
16 | ./KILL_PYROS_DOCKER_RUN || abort "Could not kill" | 15 | ./KILL_PYROS_DOCKER_RUN || abort "Could not kill" |
17 | -./KILL_PYROS_DOCKER_RUN | 16 | +# kill twice to be sure it's really dead ! |
17 | +#./KILL_PYROS_DOCKER_RUN | ||
18 | 18 | ||
19 | # 2) Update | 19 | # 2) Update |
20 | ./PYROS_DOCKER_UPDATE || abort "Could not update" | 20 | ./PYROS_DOCKER_UPDATE || abort "Could not update" |
@@ -23,7 +23,7 @@ abort() { | @@ -23,7 +23,7 @@ abort() { | ||
23 | ./PYROS_DOCKER_TEST || abort "TESTS KO" | 23 | ./PYROS_DOCKER_TEST || abort "TESTS KO" |
24 | 24 | ||
25 | # 4) Start again | 25 | # 4) Start again |
26 | -./PYROS_DOCKER_RUN || abort "Could not run" | 26 | +./PYROS_DOCKER_RUN $1 || abort "Could not run" |
27 | 27 | ||
28 | # See what's running | 28 | # See what's running |
29 | ./KILL_PYROS_DOCKER_RUN no | 29 | ./KILL_PYROS_DOCKER_RUN no |