Thank you so much for your inputs.
-Soumya
On 10/27/2015 05:49 PM, Lennart Poettering wrote:
On Tue, 27.10.15 16:05, Soumya Koduri (skod...@redhat.com) wrote:
Hi,
We have a use-case where in we have to read an environment variable (say
${MY_ENV_FILE}) from a file (say /etc/myconfig) and
On Tue, Oct 27, 2015 at 04:05:18PM +0530, Soumya Koduri wrote:
> EnvironmentFile=/etc/myconfig
>
> ExecStart=/bin/bash -c 'source ${MY_ENV_FILE} && echo ${MY_ENV_VAR}'
Systemd also does shell-like variable substitution, so potentially it's decided
to interpolate in the value of $MY_ENV_VAR
Hi,
We have a use-case where in we have to read an environment variable (say
${MY_ENV_FILE}) from a file (say /etc/myconfig) and source
${MY_ENV_FILE} to read yet another environment variable (say
${MY_ENV_VAR} in our systemd service file.
I first tried out below --
On Tue, Oct 27, 2015 at 12:35 PM, Soumya Koduri wrote:
> Hi,
>
> We have a use-case where in we have to read an environment variable (say
> ${MY_ENV_FILE}) from a file (say /etc/myconfig) and source ${MY_ENV_FILE}
> to read yet another environment variable (say ${MY_ENV_VAR}
On Tue, 27.10.15 16:05, Soumya Koduri (skod...@redhat.com) wrote:
> Hi,
>
> We have a use-case where in we have to read an environment variable (say
> ${MY_ENV_FILE}) from a file (say /etc/myconfig) and source ${MY_ENV_FILE} to
> read yet another environment variable (say ${MY_ENV_VAR} in our
Thanks Richard & Mantas. That did the trick.
-Soumya
On 10/27/2015 04:11 PM, Richard Maw wrote:
On Tue, Oct 27, 2015 at 04:05:18PM +0530, Soumya Koduri wrote:
EnvironmentFile=/etc/myconfig
ExecStart=/bin/bash -c 'source ${MY_ENV_FILE} && echo ${MY_ENV_VAR}'
Systemd also does