[CentOS] systemd environment var composed of vars

2020-07-06 Thread Leon Fauster via CentOS

Is it somehow possible to use composed ENV vars in a systemd unit file?

Simple example, env file has

ADDRESS=foo
PORT=bar
LISTEN=${ADDRESS}:${PORT}

putting ${ADDRESS}:${PORT} directly in the unit file works, $LISTEN not.

Does systemd supports such var substitution?

--
Leon





___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] systemd environment var composed of vars

2020-07-06 Thread Leon Fauster via CentOS

Am 06.07.20 um 17:25 schrieb Leon Fauster:

Is it somehow possible to use composed ENV vars in a systemd unit file?

Simple example, env file has

ADDRESS=foo
PORT=bar
LISTEN=${ADDRESS}:${PORT}

putting ${ADDRESS}:${PORT} directly in the unit file works, $LISTEN not.

Does systemd supports such var substitution?



Answering my self :-)

No, "Variable expansion is not performed inside the strings" see

man systemd.exec

--
Leon



___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos