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

Pass env:foo also to pre/post scripts #248

Closed
troglobit opened this issue Apr 26, 2022 Discussed in #240 · 2 comments
Closed

Pass env:foo also to pre/post scripts #248

troglobit opened this issue Apr 26, 2022 Discussed in #240 · 2 comments
Assignees
Milestone

Comments

@troglobit
Copy link
Owner

Discussed in #240

Originally posted by hongkongkiwi April 20, 2022
I couldn't find my answer in the docs.

Are env:.... variables passed to the pre/post scripts also? I'm interested in having one place for the vars and using them both in pre: and also running the app.

@troglobit troglobit added this to the 4.3 milestone Apr 26, 2022
@troglobit troglobit self-assigned this Apr 26, 2022
@troglobit
Copy link
Owner Author

Turns out this was partially implemented in #189, back in February, also for v4.3 ... so I'll just rip out the SERVICE_ENV_FILE* stuff and replace it with the variables sourced instead. Basically:

sh -ac '. /path/to/env; exec ./pre-post.sh'

This means the env file can be a simple foo=bar file, which Finit can read and call setenv() on all variables, and the user do not need to call export on all variables -- additionally, any functions defined in an env file could be used by the pre-post scripts, but would go ignored by Finit.

@hongkongkiwi
Copy link
Contributor

hongkongkiwi commented Apr 28, 2022 via email

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