I have a bunch of environment variables in /etc/environment
in a Debian OS. I would like to use some of these environment variables in various configuration files, for example, /etc/service/service.conf
. Typically I can use the variables, defined in /etc/environment
like below.
/etc/environment
:
MYVAR="Some value"
script.sh
:
echo ${MYVAR}
Typically I can use export MYVAR="Some value"
which the Apache configuration files can pick up, but other services such as dhcp (/etc/dhcp/dhcpd.conf) do not.
What are my options in this case?
/etc/environment is not system-wide configuration file. just use systemd-system.conf
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.