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: allow getting API token from environment #374

Merged
merged 1 commit into from
Nov 29, 2022
Merged

Conversation

mem
Copy link
Contributor

@mem mem commented Nov 24, 2022

Allow the API token to be obtained from the environment. If it's passed on the command line, that value takes precedence.

Use this mechanism in the shipped systemd service file.

Signed-off-by: Marcelo E. Magallon [email protected]

@mem mem requested a review from a team as a code owner November 24, 2022 23:09
Allow the API token to be obtained from the environment variable
SM_AGENT_API_TOKEN. If it's passed on the command line, that value takes
precedence. For backwards compatibility, in case the user decides to NOT
replace the existing configuration files (in Debian these are config
files, and the user has the option to NOT replace them during an upgrade
if they have edited them, and because of the way we have set this up,
they *have* edited them).

In the shipped systemd service file, replace passing the token on the
command line in favor of passing it on the environment.

Signed-off-by: Marcelo E. Magallon <[email protected]>
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.

2 participants