|
@ -14,7 +14,7 @@ section_enabled() { |
|
|
|
|
|
|
|
|
start_instance() { |
|
|
start_instance() { |
|
|
local cfg="$1" |
|
|
local cfg="$1" |
|
|
local port secret config_path path |
|
|
|
|
|
|
|
|
local port secret config_path local_conf path |
|
|
local args="" |
|
|
local args="" |
|
|
|
|
|
|
|
|
if ! section_enabled "$cfg"; then |
|
|
if ! section_enabled "$cfg"; then |
|
@ -25,6 +25,7 @@ start_instance() { |
|
|
config_get config_path $cfg 'config_path' |
|
|
config_get config_path $cfg 'config_path' |
|
|
config_get port $cfg 'port' |
|
|
config_get port $cfg 'port' |
|
|
config_get secret $cfg 'secret' |
|
|
config_get secret $cfg 'secret' |
|
|
|
|
|
config_get local_conf $cfg 'local_conf' |
|
|
|
|
|
|
|
|
path=${CONFIG_PATH}_$cfg |
|
|
path=${CONFIG_PATH}_$cfg |
|
|
|
|
|
|
|
@ -71,6 +72,10 @@ start_instance() { |
|
|
rm -f $path/identity.public |
|
|
rm -f $path/identity.public |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if [ -f "$local_conf" ]; then |
|
|
|
|
|
ln -s "$local_conf" $path/local.conf |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
add_join() { |
|
|
add_join() { |
|
|
# an (empty) config file will cause ZT to join a network |
|
|
# an (empty) config file will cause ZT to join a network |
|
|
touch $path/networks.d/$1.conf |
|
|
touch $path/networks.d/$1.conf |
|
|