mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-19 03:06:26 +00:00
Added docker environment way to join networks (#1871)
This commit is contained in:
parent
672c58be01
commit
c6adfd9d67
@ -60,6 +60,7 @@ To ensure you have a network available before trying to listen on it. Without pr
|
||||
|
||||
You can control a few settings including the identity used and the authtoken used to interact with the control socket (which you can forward and access through `localhost:9993`).
|
||||
|
||||
- `ZEROTIER_JOIN_NETWORKS`: additional way to set networks to join.
|
||||
- `ZEROTIER_API_SECRET`: replaces the `authtoken.secret` before booting and allows you to manage the control socket's authentication key.
|
||||
- `ZEROTIER_IDENTITY_PUBLIC`: the `identity.public` file for zerotier-one. Use `zerotier-idtool` to generate one of these for you.
|
||||
- `ZEROTIER_IDENTITY_SECRET`: the `identity.secret` file for zerotier-one. Use `zerotier-idtool` to generate one of these for you.
|
||||
|
@ -71,13 +71,23 @@ trap killzerotier INT TERM
|
||||
log "Configuring networks to join"
|
||||
mkdir -p /var/lib/zerotier-one/networks.d
|
||||
|
||||
log_params "Joining networks:" $@
|
||||
log_params "Joining networks from command line:" $@
|
||||
for i in "$@"
|
||||
do
|
||||
log_detail_params "Configuring join:" "$i"
|
||||
touch "/var/lib/zerotier-one/networks.d/${i}.conf"
|
||||
done
|
||||
|
||||
if [ "x$ZEROTIER_JOIN_NETWORKS" != "x" ]
|
||||
then
|
||||
log_params "Joining networks from environment:" $ZEROTIER_JOIN_NETWORKS
|
||||
for i in "$ZEROTIER_JOIN_NETWORKS"
|
||||
do
|
||||
log_detail_params "Configuring join:" "$i"
|
||||
touch "/var/lib/zerotier-one/networks.d/${i}.conf"
|
||||
done
|
||||
fi
|
||||
|
||||
log "Starting ZeroTier"
|
||||
nohup /usr/sbin/zerotier-one &
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user