mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-05-25 22:53:44 +02:00
more fun with the startup script
This commit is contained in:
parent
48f9f7de14
commit
332a7d1488
1 changed files with 8 additions and 6 deletions
|
@ -1,8 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -z "$ZT_IDENTITY_PATH" ]; then
|
if [ -z "$ZT_IDENTITY_PATH" ]; then
|
||||||
echo '*** FAILED: ZT_IDENTITY_PATH environment variable is not defined'
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
if [ -z "$ZT_DB_HOST" ]; then
|
if [ -z "$ZT_DB_HOST" ]; then
|
||||||
echo '*** FAILED: ZT_DB_HOST environment variable not defined'
|
echo '*** FAILED: ZT_DB_HOST environment variable not defined'
|
||||||
|
@ -59,11 +57,15 @@ fi
|
||||||
mkdir -p /var/lib/zerotier-one
|
mkdir -p /var/lib/zerotier-one
|
||||||
|
|
||||||
pushd /var/lib/zerotier-one
|
pushd /var/lib/zerotier-one
|
||||||
|
if [ -d "$ZT_IDENTITY_PATH" ]; then
|
||||||
|
echo '*** Using existing ZT identity from path $ZT_IDENTITY_PATH'
|
||||||
|
|
||||||
ln -s $ZT_IDENTITY_PATH/identity.public identity.public
|
ln -s $ZT_IDENTITY_PATH/identity.public identity.public
|
||||||
ln -s $ZT_IDENTITY_PATH/identity.secret identity.secret
|
ln -s $ZT_IDENTITY_PATH/identity.secret identity.secret
|
||||||
if [ -f "$ZT_IDENTITY_PATH/authtoken.secret" ]; then
|
if [ -f "$ZT_IDENTITY_PATH/authtoken.secret" ]; then
|
||||||
ln -s $ZT_IDENTITY_PATH/authtoken.secret authtoken.secret
|
ln -s $ZT_IDENTITY_PATH/authtoken.secret authtoken.secret
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
popd
|
popd
|
||||||
|
|
||||||
DEFAULT_PORT=9993
|
DEFAULT_PORT=9993
|
||||||
|
|
Loading…
Add table
Reference in a new issue