> /srv/webapp is a simple script that will do "exec $1/webapp"
I'm not trying to start a fight.
Why do you call out to a script, rather than having systemd make the call on its own?
It's for the same reason that java has to be invoked as
/usr/bin/env $JAVA_HOME/bin/java
thus raising questions such as http://unix.stackexchange.com/questions/229523/ .systemd does not permit variable expansions or unit parameters in the first word of ExecStart.
Assuming that your explanation applies to Spidler's situation, why not do
ExecStart=/bin/sh -c "%i/webapp"
rather than using a one-off wrapper? Does that wrapper ship with systemd?No assumption is necessary.
Note the @ in the name, that means I reuse it as [email protected] [email protected] and so on.
----8<---- [email protected] ---->8---- [Unit] Description=%i webapp
---- 8< ----/srv/webapp is a simple script that will do "exec $1/webapp" which is the actual executable.