mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-03-01 12:31:27 +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`).
|
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_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_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.
|
- `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"
|
log "Configuring networks to join"
|
||||||
mkdir -p /var/lib/zerotier-one/networks.d
|
mkdir -p /var/lib/zerotier-one/networks.d
|
||||||
|
|
||||||
log_params "Joining networks:" $@
|
log_params "Joining networks from command line:" $@
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
do
|
do
|
||||||
log_detail_params "Configuring join:" "$i"
|
log_detail_params "Configuring join:" "$i"
|
||||||
touch "/var/lib/zerotier-one/networks.d/${i}.conf"
|
touch "/var/lib/zerotier-one/networks.d/${i}.conf"
|
||||||
done
|
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"
|
log "Starting ZeroTier"
|
||||||
nohup /usr/sbin/zerotier-one &
|
nohup /usr/sbin/zerotier-one &
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user