I am curious whether I can print out fully expanded ExecStart/ExecStop
command line. Consider following example:
ExecStart=/usr/bin/java $OPTS_COMMON $OPTS $OPTS_LOG $OPTS_DEBUG some.class.Start --param1 ${PARAM1} --param2 ${PARAM2}
I am having quite long command lines with a lot of environment variables involved. If some of the variables becomes wrong (for example by drop-in configuration), service might not start at all. However I do not see fully expanded line with substituted envs anywhere and I struggle to find out what is wrong.
I had no luck googling this and so far the only possibility I found is to modify unit file to run /usr/bin/echo
instead of service itself. But that is a bit tiresome. Or even more annoying solution - check every environment variable one-by-one.
Is there some way how to force systemd to show me what is actually attempted to be run?