@@ -47,6 +47,7 @@ hostnames=$(ghe-ssh "$GHE_HOSTNAME" ghe-config --get-regexp cluster.*.hostname |
4747for hostname in $hostnames ; do
4848 config=" $config
4949Host $hostname
50+ ServerAliveInterval 60
5051 ProxyCommand ssh -q $GHE_EXTRA_SSH_OPTS -p $port $user @$host nc.openbsd %h %p"
5152done
5253
@@ -59,22 +60,21 @@ cleanup() {
5960 for pid in $( jobs -p) ; do
6061 kill -KILL $pid > /dev/null 1>&2 || true
6162 done
62- rm -rf $config_file ssh_routes_in ssh_routes_out ssh_finalize_in ssh_finalize_out
63+ rm -rf $config_file ssh_routes_in ssh_routes_out ssh_finalize_out
6364}
6465
6566trap ' cleanup' INT TERM EXIT
6667
67- rm -rf ssh_routes_in ssh_routes_out ssh_finalize_in ssh_finalize_out
68+ rm -rf ssh_routes_in ssh_routes_out ssh_finalize_out
6869mkfifo ssh_routes_in
6970mkfifo ssh_routes_out
70- mkfifo ssh_finalize_in
7171mkfifo ssh_finalize_out
7272
7373echo " Setting up storage processes"
7474
7575ghe-ssh " $GHE_HOSTNAME " github-env ./bin/storage-cluster-import-routes - < ssh_routes_out > ssh_routes_in &
7676ssh_routes_pid=$!
77- ghe-ssh " $GHE_HOSTNAME " github-env ./bin/storage-cluster-import-finalize - < ssh_finalize_out > ssh_finalize_in &
77+ ghe-ssh " $GHE_HOSTNAME " github-env ./bin/storage-cluster-import-finalize - < ssh_finalize_out &
7878ssh_finalize_pid=$!
7979
8080echo " Set up storage processes"
@@ -114,8 +114,7 @@ exec 4>&-
114114exec 5>& -
115115
116116# Ensure to flush these and close the pipes
117- cat ssh_routes_in > /dev/null
118- cat ssh_finalize_in > /dev/null
117+ cat ssh_routes_in > /dev/null &
119118
120- wait $ssh_routes_pid > /dev/null 1>&2 || true
121- wait $ssh_finalize_pid > /dev/null 1>&2 || true
119+ wait $ssh_routes_pid > /dev/null 2>&1 || true
120+ wait $ssh_finalize_pid > /dev/null 2>&1 || true
0 commit comments