From 3e261fb999895d32e1253098d7f28933f50782a4 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 17 Aug 2016 18:33:49 -0700 Subject: [PATCH] updated entrypoint --- doc/ext/kubernetes/Dockerfile | 2 +- doc/ext/kubernetes/entrypoint.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ext/kubernetes/Dockerfile b/doc/ext/kubernetes/Dockerfile index c33b6babc..74af6c1ac 100644 --- a/doc/ext/kubernetes/Dockerfile +++ b/doc/ext/kubernetes/Dockerfile @@ -6,7 +6,7 @@ RUN mkdir -p /var/lib/zerotier-one/networks.d ADD *.conf /var/lib/zerotier-one/networks.d/ ADD zerotier / ADD zerotier-cli / -ADD .zerotierCliSettings /root/ +ADD .zerotierCliSettings / # Install App ADD server.js / diff --git a/doc/ext/kubernetes/entrypoint.sh b/doc/ext/kubernetes/entrypoint.sh index 8ec7312aa..881d92cfa 100644 --- a/doc/ext/kubernetes/entrypoint.sh +++ b/doc/ext/kubernetes/entrypoint.sh @@ -13,9 +13,9 @@ echo '*** Up and running at' $virtip4 ' on network: ' $nwid echo '*** Self-Authorizing to deployment network' nwconf=$(ls *.conf) nwid="${nwconf%.*}" -AUTHTOKEN="(cat /var/lib/zerotier-one/authtoken.secret)" -grep -rl 'local_service_auth_token' ./ | xargs sed -i 's/local_service_auth_token/' $AUTHTOKEN '/g' +AUTHTOKEN=$(cat /var/lib/zerotier-one/authtoken.secret) +sed "s|\local_service_auth_token|${AUTHTOKEN}|" .zerotierCliSettings > /root/.zerotierCliSettings ./zerotier-cli join $(nwid).conf ./zerotier-cli net-auth $(nwid) $(dev)