From 3f99a8c6db9103420bccf6b01ba85ed1cef83cde Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Mon, 23 Mar 2015 22:36:01 -0400 Subject: [PATCH] 5539: Retry keepproxy if it quits (this happens when restarting the container, the api server isn't ready yet, so need to keep trying). --- docker/keepproxy/run-keepproxy.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/keepproxy/run-keepproxy.in b/docker/keepproxy/run-keepproxy.in index 08fc4414bf..4bd934d5b3 100755 --- a/docker/keepproxy/run-keepproxy.in +++ b/docker/keepproxy/run-keepproxy.in @@ -6,4 +6,10 @@ export ARVADOS_API_HOST_INSECURE=yes # to get one while building the images export ARVADOS_API_TOKEN=@@API_SUPERUSER_SECRET@@ -exec keepproxy -listen=':9100' +read pid cmd state ppid pgrp session tty_nr tpgid rest < /proc/self/stat +trap "kill -TERM -$pgrp; exit" HUP EXIT TERM QUIT + +while /bin/true ; do + keepproxy -listen=':9100' + sleep 1 +done -- 2.30.2