linux - How to write systemd environment variables value which contains = -


in systemd units file, have environment content key=iamvalue=abc, can see value iamvalue=abc contains =.

for situation, how can write unit files?

i have tried following, seems invalid:

[unit] description=...  [service] workingdirectory=... execstart=... restart=always restartsec=10                                           syslogidentifier=... user=root environment=key="iamvalue=abc" 

i tested works in test.service file:

[unit] description=hi  [service] type=oneshot environment=key="iamvalue=abc" execstart=/bin/bash -c "/bin/echo key:$key" 

if run , journalctl -u test, can see key containing equal sign works.

i've proposed update official systemd docs better clarify case.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -