Exit tunnel script if some of children dies
This commit is contained in:
parent
9f4b74e68d
commit
9b69b92548
@ -25,4 +25,10 @@ at_exit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
trap at_exit EXIT
|
trap at_exit EXIT
|
||||||
sleep inf
|
|
||||||
|
wait -n
|
||||||
|
code=$?
|
||||||
|
|
||||||
|
if [ $code != 0 ]; then
|
||||||
|
exit $code
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user