I use systemd on debian jessie to control the service into which I load environment variables via EnvironmentFile=/etc/default/myservice
in this file I have a variable that is a public key
JWT_PUB_KEY="-----BEGIN FOO BAR KEY----- MIIBgjAcBgoqhkiG9w0BDAEDMA4ECKZesfWLQOiDAgID6ASCAWBu7izm8N4V 2puRO/Mdt+Y8ceywxiC0cE57nrbmvaTSvBwTg9b/xyd8YC6QK7lrhC9Njgp/ ... -----END FOO BAR KEY-----"
Putting it like this, it will not like systemd, which reports an error (although the execution of source in bash of the same file works correctly)
the systemd report documentation that you can have a multi-line variable ending each file with \ but concatenate each line (so that my program gets an integer under one line, which is not a more valid public key)
Is there a known way to keep the end of a line? without resorting to hacking, how to put \n which they "interpret" in my application code?
systemd
allan.simon
source share