enable autopeering via environmental variable #1342
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The reasoning behind this PR is that I was unable to successfully modify the systemd service for skywire via a drop-in override configuration file to change
ExecStart
to include the-m
flag for enabling the autopeering ; nor was I able to render an env in ExecStart to provide the -m flag. The variable could only render the flag in quotes, at best, which does not work with cobra.My solution to this is to set the env either in the systemd drop-in ; and have the visor detect this env directly rather than requiring it's flag.
The default value of the
-m
flag for skywire-visor is changed to true if theAUTOPEER
env equals the string "1"Did you run
make format && make check
?yes
Changes:
AUTOPEER=1
ifSKYBIAN=true
How to test this PR: