Hi , I wanted to try env-file property of dinit service
I create
/etc/dinit.d/hello#cat /etc/dinit.d/hello
type = scripted
command = echo $VAR
env-file = /etc/dinit.d/config/hello.cfg
logfile = /tmp/hello.log
also created
/etc/dinit.d/config/hello.cfgVAR="Hi"
but I dont see variable substitution in log file.
Am I doing wrong?
If possible provide some example for env-file usage
The values from the file specified by env-file aren't used for command line variable substitution. From "man dinit-service":
env-file = file
Specifies a file containing value assignments for environment
variables, in the same format recognised by the dinit command's
--env-file option. The file is read (or re-read) whenever the
service is started; the values read do not affect for the
processing performed for the sub-vars load option, which is done
when the service description is loaded.
This behaviour might change in a future version of Dinit.
(also you would currently need "load-options = sub-vars" to substitute environment variables regardless)