Can I tell my device file to wait for any instance (name of an unknown instance) of the template file?
Something like this: After = template @ *. service
Example:
I have this template file (template @ .service):
[Unit] Description=TemplateFile After=network.target [Service] Type=idle ExecStart=/bin/sh -c '${JBOSS_HOME}/bin/standalone.sh ${JBOSS_START_OPTS}' ExecStop=/bin/sh -c '${JBOSS_HOME}/bin/jboss-cli.sh ${JBOSS_STOP_OPTS}' [Install] WantedBy=multi-user.target
And I have this unit (other.service) file:
[Unit] Description=Other After=network.target
I want the other.service module to start only when at least one instance of the @ .service template is started
source share