You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pleaserun generates a systemd unit including a directive EnvironmentFile, however,
when trying to specify an environment variable in the command to run, like
hmm.. Maybe we can add a flag that prevents the extra escaping that pleaserun is doing in the shell_args part of the systemd template?
I'm not exactly sure what the best approach would be for this. Open to ideas (though changing the current behavior is unlikely to work well given it would break existing things, so this will likely be a flag)
Passing in extra flags on the command-line would work fine for me.
To give you a little background on why I'm wanting to do this. I'm building a customised Kibana, and wanting to pass in multiple configuration files. The default systemd service file only allows for one config file, which is why I'm wanting to play with the pleaserun arguments. It's such a shame that Kibana doesn't recognise environment variables to set configuration options!
I have a workaround however, I've modified the /usr/share/bin/kibana shell script to directly access environment variables that I've put into /etc/sysconfig/kibana. So no emergency on a fix (for me)
Pleaserun generates a systemd unit including a directive EnvironmentFile, however,
when trying to specify an environment variable in the command to run, like
$PLEASERUN_COMMAND -p systemd /usr/bin/java -Xms\${MEMORY_INIT} -Xmx\${MEMORY_MAX} org.myorg.program
the generated unit file escapes the
$
:ExecStart=/usr/bin/java "-Xms\${MEMORY_INIT}" "-Xmx\${MEMORY_MAX}"
The \ in the unit file is set by pleaserun, as putting the arguments in single quotes results in the
$
being escaped too.To make it work, the line has to be:
ExecStart=/usr/bin/java "-Xms${MEMORY_INIT}" "-Xmx${MEMORY_MAX}"
The text was updated successfully, but these errors were encountered: