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

run systemd ExecStart command as login shell #203

Open
f6p opened this issue Apr 26, 2018 · 1 comment
Open

run systemd ExecStart command as login shell #203

f6p opened this issue Apr 26, 2018 · 1 comment

Comments

@f6p
Copy link

f6p commented Apr 26, 2018

For example:

Rails 5.2 introduced encrypted credentials. One way master key can be stored is via ENV["RAILS_MASTER_KEY"]. If ExecStart is not executed as login shell variables set in .bashrc are not available, credentials decrypted and app crashes here and there depending on how they are referenced.

Would it be possible to wrap systemd template command in /bin/bash -lc "..."?

Cheers 🍷

@m0n9oose
Copy link

You don't really need this. Just set your env variable like this:

Environment=MASTER_KEY=your_master_key_string

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