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

config file instead of config environment variable #118

Open
jaydouble opened this issue Feb 3, 2023 · 2 comments
Open

config file instead of config environment variable #118

jaydouble opened this issue Feb 3, 2023 · 2 comments

Comments

@jaydouble
Copy link

Hi,

I want to use this, but I need a couple of forwards. When I create a couple of forwards the config environment variable will become a long string, so it will become a potential failure.

Is it possible to create a config file, that will be the same a the config, but then newline separated?
So the script to load to config will be like:

if [ -z "$SMF_CONFIG" ]; then
  SMF_CONFIG=$(cat /smf_config.txt | tr '\n' ';')
fi

that script is not tested, just a thinking around..

@huan
Copy link
Owner

huan commented Feb 3, 2023

Thanks for sharing!

It looks like it's a convenient way to load the config to the environment variable; if it works as expected, I'd like to accept a PR to add it to README as a recommended way to load the config from the file.

@jaydouble
Copy link
Author

Hi, a added a PR:
#119

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

No branches or pull requests

2 participants