File tree Expand file tree Collapse file tree
ext/central-controller-docker Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
33if [ -z " $ZT_IDENTITY_PATH " ]; then
4- echo ' *** FAILED: ZT_IDENTITY_PATH environment variable is not defined'
5- exit 1
64fi
75if [ -z " $ZT_DB_HOST " ]; then
86 echo ' *** FAILED: ZT_DB_HOST environment variable not defined'
5957mkdir -p /var/lib/zerotier-one
6058
6159pushd /var/lib/zerotier-one
62- ln -s $ZT_IDENTITY_PATH /identity.public identity.public
63- ln -s $ZT_IDENTITY_PATH /identity.secret identity.secret
64- if [ -f " $ZT_IDENTITY_PATH /authtoken.secret" ]; then
65- ln -s $ZT_IDENTITY_PATH /authtoken.secret authtoken.secret
60+ if [ -d " $ZT_IDENTITY_PATH " ]; then
61+ echo ' *** Using existing ZT identity from path $ZT_IDENTITY_PATH'
62+
63+ ln -s $ZT_IDENTITY_PATH /identity.public identity.public
64+ ln -s $ZT_IDENTITY_PATH /identity.secret identity.secret
65+ if [ -f " $ZT_IDENTITY_PATH /authtoken.secret" ]; then
66+ ln -s $ZT_IDENTITY_PATH /authtoken.secret authtoken.secret
67+ fi
6668fi
6769popd
6870
You can’t perform that action at this time.
0 commit comments