Skip to content

Commit 6c15217

Browse files
Gabriel MonroyMatthew Fisher
authored andcommitted
fix(router): handle non-zero rc from etcdctl mkdir
1 parent 34aab76 commit 6c15217

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

router/bin/boot

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,18 @@ sleep $(($ETCD_TTL+1))
2525

2626
# seed initial service configuration if necessary
2727
if ! etcdctl -C $ETCD ls /deis/services >/dev/null 2>&1; then
28-
etcdctl -C $ETCD mkdir /deis/services
28+
etcdctl -C $ETCD mkdir /deis/services || true 2>/dev/null
2929
etcdctl -C $ETCD set $ETCD_PATH/port ${PORT:-80}
30-
etcdctl -C $ETCD set $ETCD_PATH/workerConnections 1024
31-
etcdctl -C $ETCD set $ETCD_PATH/workerProcesses 2
3230
fi
3331

3432
# wait for confd to run once and install initial templates
35-
until confd -onetime -node $ETCD -config-file /app/confd.toml; do
33+
until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>/dev/null; do
3634
echo "waiting for confd to write initial templates..."
3735
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
3836
done
3937

4038
# spawn the service in the background
39+
echo "Starting Nginx..."
4140
/usr/sbin/nginx &
4241
SERVICE_PID=$!
4342

0 commit comments

Comments
 (0)