I'm finally trying to convert my old init.d management script to systemd, and have run into a snag that I hope someone else has found a solution to.
My application expects an argument for the name of the file it saves logging information to, and my init script generates that name at startup with this line:
LOGFILE=`/bin/date "+$MUDDIR/lib/log/runlog.%y%m%d-%H%M%S"`
How would I go about having such a construct get run so the value is available for use in ExecStart?
Can I do something as simple as
ExecStartPre=LOGFILE=`/bin/date "+${MUDDIR}/lib/log/runlog.%y%m%d-%H%M%S"`
or would it throw a fit at trying to spawn a shell there? If it runs the command as a subshell, the value would be thrown away.
Also, if I specify multiple ExecStartPre lines, will they be executed in order?
Thanks for any hints. The documentation is a bit light on details in some places, and I'm just trying to preserve my original functionality without being cheesy and just having it call my old script.