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

Upstart init script does not source environment variables, nor does it pass environment variables on #1023

Closed
timcharper opened this issue Aug 28, 2017 · 1 comment

Comments

@timcharper
Copy link
Contributor

Expected behaviour

When I generate an upstart template, I would expect that the environment variables specified in /etc/default/{my-service-name} would be sources and used by Upstart.

Actual behaviour

/etc/default/{my-service-name} is ignored entirely. Further, the sudo command, by default, resets all environment variables, so even if any were specified in the init file, they would be ignored.

Information

  • What sbt-native-packager are you using: 1.2.2
  • What sbt version: 0.13.x
  • What is your build system (e.g. Ubuntu, MacOS, Windows, Debian ): Ubuntu
  • What package are you building (e.g. docker, rpm, ...): debian
  • What version has your build tool (find out with e.g. rpm --version)
  • What is your target system (e.g. Ubuntu 16.04, CentOS 7): Ubuntu 14.04
timcharper added a commit to timcharper/sbt-native-packager that referenced this issue Aug 28, 2017
Fixes sbt#1023

Note that auto-export is not enabled, so vars must be exported as they
are with SystemV.
timcharper added a commit to timcharper/sbt-native-packager that referenced this issue Aug 28, 2017
Fixes sbt#1023

Note that auto-export is not enabled, so vars must be exported as they
are with SystemV.
@muuki88 muuki88 added universal Zip, tar.gz, tgz and bash issues bug feature request and removed bug labels Nov 1, 2017
@muuki88
Copy link
Contributor

muuki88 commented Nov 1, 2017

Sorry for the very late reply 😢 I must have overlooked this one.

I took a look at the code and it seems this hasn't been implemented yet.
For example the debian systemv start script sources the config file, while the upstart script doesn't seem to contain any code doing this.

@muuki88 muuki88 added debian and removed universal Zip, tar.gz, tgz and bash issues labels Nov 1, 2017
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

2 participants