[lug] Environment variable expansion in systemd service files
Chris Riddoch
riddochc at gmail.com
Sun Feb 26 20:15:30 MST 2017
I've been trying to figure out how to accomplish something in systemd
service configuration files, I hope maybe someone else has tried to do
something similar before and recognizes this. I've made the following test
service:
[Unit]
Description=Environment test
[Service]
Environment=A=/a/b
Environment=C=$A/c
WorkingDirectory=/tmp
Type=simple
ExecStart=/bin/echo $C
StandardOutput=syslog
[Install]
WantedBy=default.target
I can't seem to get the definition of C to include A, no matter what sort
of escaping I've tried. This is, of course, a reduced case - the actual
situation is one where quite a few environment variables are being defined
with reference to each other.
Any ideas?
--
Chris Riddoch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20170226/9ea1a03e/attachment.html>
More information about the LUG
mailing list