updated entrypoint

This commit is contained in:
Joseph Henry 2016-08-17 18:33:49 -07:00
parent 0fd3afe2c8
commit 3e261fb999
2 changed files with 3 additions and 3 deletions

View File

@ -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 /

View File

@ -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)