Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with instances sharing config dir. #70

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

efarrer
Copy link
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