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

Systemd packaging doesn't support multiple EnvironmentFile options #968

Closed
412b opened this issue Apr 25, 2017 · 5 comments
Closed

Systemd packaging doesn't support multiple EnvironmentFile options #968

412b opened this issue Apr 25, 2017 · 5 comments

Comments

@412b
Copy link
Contributor

412b commented Apr 25, 2017

Expected behaviour

Multiple files/options to be sourced can be provided
man systemd.exec: "This option may be specified more than once in which case all specified files are read."

Actual behaviour

Only single file/option can be provided

Information

  • sbt-native-packager 1.2.0-M8
  • sbt 0.13.15
  • Ubuntu 17.04, systemd, deb
  • Target system is Ubuntu 16.04

currently EnvironmentFile is bounded to bashScriptEnvConfigLocation, but for example in my case I also want to source /etc/environment and it can be achieved only by overriding a template, which is not the best way, IMHO.

@muuki88
Copy link
Contributor

muuki88 commented Apr 26, 2017

Thanks for your feature request @412b

The bashScriptEnvConfigLocation is just a string. So you could concat the files as you like. This may not be a very nice solution, but it works.

We could also implement this feature by adding a new setting in the SystemLoaderKeys. This would also require

  • decouple this setting from the bashScriptEnvConfigLocation
  • make a clear distinction when to use the bashScriptEnvConfigLocation or the env files
  • Implement this properly for all the systemloaders (systemv, upstart, systemd)

@412b
Copy link
Contributor Author

412b commented Apr 27, 2017

@muuki88 actually I had in mind one more option: make systemd specific setting (as upstart and systemv doesn't have such or alike feature) and append bashScriptEnvConfigLocation as last entry to override vars set in sourced files, so that custom script is there as well as others.
though it's not a generic way across systemloaders, having setting with sequence of files/strings/urls for known-to-not-support systemloaders is also not transparent.
WDYT?

@muuki88
Copy link
Contributor

muuki88 commented Apr 27, 2017

This is a reasonable approach if the bashScriptEnvConfigLocation is only used in systemloaders. I hadn't had the time to check that, but if this is the case , I'm happy to discuss this in depth on a pull request if you have the time 😊

@muuki88 muuki88 closed this as completed Jul 14, 2019
@martijnhoekstra
Copy link
Contributor

martijnhoekstra commented Jul 12, 2023

I see the issue is closed as completed. Did this end up being implemented?

@muuki88 muuki88 reopened this Aug 4, 2023
@muuki88 muuki88 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2023
@muuki88
Copy link
Contributor

muuki88 commented Aug 4, 2023

I used the wrong close 🥲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants