Skip to content

Fix issue with instances sharing config dir.#70

Open
efarrer wants to merge 4 commits intoboinkor-net:mainfrom
efarrer:config-dir
Open

Fix issue with instances sharing config dir.#70
efarrer wants to merge 4 commits intoboinkor-net:mainfrom
efarrer:config-dir

Conversation

@efarrer
Copy link
Copy Markdown
Contributor

@efarrer efarrer commented Oct 18, 2023

For legacy installations (where a tsnet-tsnsrv directory has been created) a new "machine-name" fill will be created in the tsnet-tsnsrv directory if it doesn't already exist. The machine-name will contain the name that was passed with the -name command line argument.

If the machine-name file already exists and it matches what was passed with the -name command line argument then that directory will be used as the configuration directory.

If the tsnet-tsnsrv directory doesn't exist or if the machine-name doesn't match then a new tsnet-tsnsrv- directory will be used to store tsnet configuration.

This allows for more that one tsnsrv instance to be started without having to specify a config directory without needing to set the TS_STATE_DIR env var or pass the -stateDir flag.

Fixes: #62

Evan Farrer added 4 commits October 18, 2023 03:12
For legacy installations (where a tsnet-tsnsrv directory has been
created) a new "machine-name" fill will be created in the tsnet-tsnsrv
directory if it doesn't already exist. The machine-name will contain the
name that was passed with the -name command line argument.

If the machine-name file already exists and it matches what was passed
with the -name command line argument then that directory will be used as
the configuration directory.

If the tsnet-tsnsrv directory doesn't exist or if the machine-name
doesn't match then a new tsnet-tsnsrv-<name> directory will be used to
store tsnet configuration.

This allows for more that one tsnsrv instance to be started without
having to specify a config directory without needing to set the
TS_STATE_DIR env var or pass the -stateDir flag.

Fixes: boinkor-net#62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Brittle behavior when starting subsequent tsnsrv instances.

1 participant