Closed troglobit closed 2 years ago
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.
Nice! That should make things very flexible.
Discussed in https://github.com/troglobit/finit/discussions/240