On Sat, Mar 08, 2025 at 20:04:16 -0700, [email protected] wrote:
> # ls -1 /lib/systemd/system/stunnel*
> /lib/systemd/system/[email protected]
> /lib/systemd/system/stunnel.target
> 
> What is [email protected], rather than stunnel.service?

systemd.service(5):

SERVICE TEMPLATES
       It is possible for systemd services to take a single argument via the
       "[email protected]" syntax. Such services are called
       "instantiated" services, while the unit definition without the argument
       parameter is called a "template". An example could be a [email protected]
       service template which takes a network interface as a parameter to form
       an instantiated service. Within the service file, this parameter or
       "instance name" can be accessed with %-specifiers. See systemd.unit(5)
       for details.

systemd.unit(5):

       As mentioned above, a unit may be instantiated from a template file.
       This allows creation of multiple units from a single configuration
       file. If systemd looks for a unit configuration file, it will first
       search for the literal unit name in the file system. If that yields no
       success and the unit name contains an "@" character, systemd will look
       for a unit template that shares the same name but with the instance
       string (i.e. the part between the "@" character and the suffix)
       removed. Example: if a service [email protected] is requested and no
       file by that name is found, systemd will look for [email protected] and
       instantiate a service from that configuration file if it is found.

Reply via email to